Use native functions wherever possible

Native:
  * realpath()
  * basename()
  * addslashes()
  * var_export()
  * gettype()
  * ceil()
  * is_dir()
  * unlink()
  * filemtime()
  * strval()
  * array_values()
  * defined()
  * constant()
  * date()
  * trigger_error()
  * connection_aborted()
  * reset()
  * in_array()