This class contains externs for native PHP functions defined in global namespace. For native PHP constants in global namespace see php.Const.

Static methods

staticabs<T>(number:T):T

@:value({ flag : 0 })staticarray_filter(array:NativeArray, ?callback:(Dynamic, Dynamic) ‑> Bool, flag:Int = 0):NativeArray

staticarray_filter(array:NativeArray, callback:Dynamic ‑> Bool, ?flag:Int):NativeArray

@:value({ preserve_keys : false })staticarray_reverse(array:NativeArray, preserve_keys:Bool = false):NativeArray

@:value({ strict : false })staticarray_search(needle:Dynamic, haystack:NativeArray, strict:Bool = false):EitherType<Bool, EitherType<String, Int>>

@:value({ preserve_keys : false, length : null })staticarray_slice(array:NativeArray, offset:Int, ?length:Int, preserve_keys:Bool = false):NativeArray

@:value({ lenght : 0 })staticarray_splice(array:Ref<NativeArray>, offset:Int, lenght:Int = 0, ?replacement:Dynamic):NativeArray

@:value({ strict : false })staticbase64_decode(data:String, strict:Bool = false):EitherType<String, Bool>

@:value({ type : "MX" })staticcheckdnsrr(host:String, type:String = "MX"):Bool

@:value({ end : "\r\n", chunklen : 76 })staticchunk_split(body:String, chunklen:Int = 76, end:String = "\r\n"):String

@:value({ autoload : true })staticclass_alias(original:String, alias:String, autoload:Bool = true):Bool

@:value({ autoload : true })staticclass_exists(class_name:String, autoload:Bool = true):Bool

@:value({ clear_realpath_cache : false })staticclearstatcache(clear_realpath_cache:Bool = false, ?filename:String):Bool

@:value({ case_insensitive : false })staticdefine(name:String, value:Dynamic, case_insensitive:Bool = false):Bool

@:value({ levels : 1 })staticdirname(path:String, levels:Int = 1):String

@:value({ message_type : 0 })staticerror_log(message:String, message_type:Int = 0, ?destination:String, ?extra_headers:String):Bool

@:value({ offset : 0, use_include_path : false })staticfile_get_contents(filename:String, use_include_path:Bool = false, ?context:Resource, offset:Int = 0, ?maxlen:Int):EitherType<String, Bool>

@:value({ flags : 0 })staticfile_put_contents(filename:String, data:Dynamic, flags:Int = 0, ?context:Resource):EitherType<Int, Bool>

@:value({ flags : 0 })staticfinfo_file(finfo:Finfo, filename:String, flags:Int = 0, ?context:Resource):EitherType<String, Bool>

@:value({ flags : 0 })staticfinfo_open(flags:Int = 0, ?magic_database:String):EitherType<Finfo, Bool>

staticflock(handle:Resource, operation:Int, ?wouldblock:Ref<Int>):Bool

@:value({ flags : 0 })staticfnmatch(pattern:String, string:String, flags:Int = 0):Bool

@:value({ use_include_path : false })staticfopen(filename:String, mode:String, use_include_path:Bool = false, ?context:Resource):EitherType<Bool, Resource>

staticfseek(handle:Resource, offset:Int, ?whence:Int):Int

staticftp_append(ftp:Resource, remote_filename:String, local_filename:String, ?mode:Int):Bool

@:value({ timeout : 90, port : 21 })staticftp_connect(hostname:String, port:Int = 21, timeout:Int = 90):EitherType<Resource, Bool>

@:value({ offset : 0 })staticftp_fget(ftp:Resource, stream:Resource, remote_filename:String, ?mode:Int, offset:Int = 0):Bool

@:value({ offset : 0 })staticftp_fput(ftp:Resource, remote_filename:String, stream:Resource, ?mode:Int, offset:Int = 0):Bool

@:value({ offset : 0 })staticftp_get(ftp:Resource, local_filename:String, remote_filename:String, offset:Int = 0):Bool

@:value({ offset : 0 })staticftp_nb_fget(ftp:Resource, stream:Resource, remote_filename:String, ?mode:Int, offset:Int = 0):Int

@:value({ offset : 0 })staticftp_nb_fput(ftp:Resource, remote_filename:String, stream:Resource, ?mode:Int, offset:Int = 0):Int

@:value({ offset : 0 })staticftp_nb_get(ftp:Resource, local_filename:String, remote_filename:String, offset:Int = 0):Int

@:value({ offset : 0 })staticftp_nb_put(ftp:Resource, remote_filename:String, local_filename:String, offset:Int = 0):EitherType<Int, Bool>

@:value({ offset : 0 })staticftp_put(ftp:Resource, remote_filename:String, local_filename:String, offset:Int = 0):Bool

@:value({ recursive : false })staticftp_rawlist(ftp:Resource, directory:String, recursive:Bool = false):EitherType<NativeIndexedArray<String>, Bool>

@:value({ timeout : 90, port : 21 })staticftp_ssl_connect(hostname:String, port:Int = 21, timeout:Int = 90):EitherType<Resource, Bool>

@:value({ return_array : false })staticget_browser(?user_agent:String, return_array:Bool = false):EitherType<Dynamic, EitherType<NativeArray, Bool>>

@:value({ object : null })staticget_class(?object:{}):EitherType<Bool, String>

@:value({ categorize : false })staticget_defined_constants(categorize:Bool = false):NativeArray

@:value({ flags : 0 })staticglob(pattern:String, flags:Int = 0):NativeArray

staticgmmktime(?hour:Int, ?minute:Int, ?second:Int, ?month:Int, ?day:Int, ?year:Int, ?is_dst:Int):Int

@:value({ raw_output : false })statichash(algo:String, str:String, raw_output:Bool = false):String

@:value({ binary : false })statichash_hmac(algo:String, data:String, key:String, binary:Bool = false):EitherType<String, Bool>

@:value({ binary : false })statichash_hmac_file(algo:String, data:String, key:String, binary:Bool = false):EitherType<String, Bool>

@:value({ replace : true })staticheader(string:String, replace:Bool = true, ?http_response_code:Int):Void

@:value({ returns : false })statichighlight_file(filename:String, returns:Bool = false):EitherType<String, Bool>

@:value({ returns : false })statichighlight_string(string:String, returns:Bool = false):EitherType<String, Bool>

@:value({ double_encode : true })statichtmlentities(string:String, ?flags:Int, ?encoding:String, double_encode:Bool = true):String

@:value({ double_encode : true })statichtmlspecialchars(string:String, ?flags:Int, ?encoding:String, double_encode:Bool = true):String

@:value({ strict : false })staticin_array(needle:Dynamic, haystack:NativeArray, strict:Bool = false):Bool

@:value({ autoload : true })staticinterface_exists(interface_name:String, autoload:Bool = true):Bool

@:value({ base : 10 })staticintval(value:Dynamic, base:Int = 10):Int

@:value({ syntax_only : false })staticis_callable(value:Dynamic, syntax_only:Bool = false, ?callable_name:String):Bool

@:value({ allow_string : true })staticis_subclass_of(value:Dynamic, className:String, allow_string:Bool = true):Bool

@:value({ options : 512, depth : 512, assoc : false })staticjson_decode(json:String, assoc:Bool = false, depth:Int = 512, options:Int = 512):Dynamic

@:value({ depth : 512, options : 0 })staticjson_encode(value:Dynamic, options:Int = 0, depth:Int = 512):EitherType<String, Bool>

staticmail(to:String, subject:String, message:String, ?additional_headers:String, ?additional_parameters:String):Bool

staticmb_chr(cp:Int, ?encoding:String):String

See also:

staticmb_ord(str:String, ?encoding:String):Int

See also:

@:value({ length : null })staticmb_substr(str:String, start:Int, ?length:Int, ?encoding:String):String

@:value({ raw_output : false })staticmd5(str:String, raw_output:Bool = false):String

@:value({ get_as_float : false })staticmicrotime(get_as_float:Bool = false):EitherType<Float, String>

@:value({ recursive : false, mode : 511 })staticmkdir(pathname:String, mode:Int = 511, recursive:Bool = false, ?context:Resource):Bool

staticmktime(?hour:Int, ?minute:Int, ?second:Int, ?month:Int, ?day:Int, ?year:Int, ?is_dst:Int):EitherType<Int, Bool>

staticnumber_format(num:Float, ?decimals:Int, ?decimal_separator:String, ?thousands_separator:String):String

@:value({ full_status : false })staticob_get_status(full_status:Bool = false):NativeArray

@:value({ chunk_size : 0, output_callback : null })staticob_start(?output_callback:(String, Int) ‑> String, chunk_size:Int = 0, ?flags:Int):Bool

@:value({ force : false })staticopcache_invalidate(script:String, force:Bool = false):Bool

@:value({ process_sections : false })staticparse_ini_file(filename:String, process_sections:Bool = false, ?scanner_mode:Int):EitherType<NativeAssocArray<Dynamic>, Bool>

@:value({ process_sections : false })staticparse_ini_string(ini:String, process_sections:Bool = false, ?scanner_mode:Int):EitherType<NativeAssocArray<Dynamic>, Bool>

@:value({ mode : "a" })staticphp_uname(mode:String = "a"):String

staticpreg_match(pattern:String, subject:String, ?matches:NativeArray, ?flags:Int, ?offset:Int):EitherType<Bool, Int>

@:value({ flags : 0, limit : -1 })staticpreg_split(pattern:String, subject:String, limit:Int = -1, flags:Int = 0):EitherType<Bool, NativeArray>

@:value({ signal : 15 })staticproc_terminate(process:Resource, signal:Int = 15):Bool

@:value({ precision : 0 })staticround(val:Float, precision:Int = 0, ?mode:Int):Float

@:value({ delete_old_session : false })staticsession_regenerate_id(delete_old_session:Bool = false):Bool

@:value({ httponly : false, secure : false })staticsession_set_cookie_params(lifetime:Int, ?path:String, ?domain:String, secure:Bool = false, httponly:Bool = false):Bool

staticsession_set_cookie_params(options:NativeStructArray<{secure:Null<Bool>, samesite:Null<String>, path:Null<String>, lifetime:Null<Int>, httponly:Null<Bool>, domain:Null<String>}>):Bool

staticsession_set_save_handler(open:(String, String) ‑> Bool, close:() ‑> Bool, read:String ‑> String, write:(String, String) ‑> Bool, destroy:String ‑> Bool, gc:Int ‑> Bool, ?create_sid:() ‑> String, ?validate_sid:Function, ?update_timestamp:Function):Bool

@:value({ register_shutdown : true })staticsession_set_save_handler(sessionhandler:SessionHandlerInterface, register_shutdown:Bool = true):Bool

staticset_error_handler(?error_handler:(Int, String, String, Int, Array<Dynamic>) ‑> Bool, ?error_types:Int):Dynamic

staticset_error_handler(error_handler:(Int, String) ‑> Bool, ?error_types:Int):Dynamic

staticset_error_handler(error_handler:(Int, String, String) ‑> Bool, ?error_types:Int):Dynamic

staticset_error_handler(error_handler:(Int, String, String, Int) ‑> Bool, ?error_types:Int):Dynamic

@:value({ httponly : false, secure : false, domain : "", path : "", expire : 0, value : "" })staticsetcookie(name:String, value:String = "", expire:Int = 0, path:String = "", domain:String = "", secure:Bool = false, httponly:Bool = false):Bool

@:value({ value : "" })staticsetcookie(name:String, value:String = "", ?options:NativeStructArray<{secure:Null<Bool>, samesite:Null<String>, path:Null<String>, httponly:Null<Bool>, expires:Null<Int>, domain:Null<String>}>):Bool

@:value({ raw_output : false })staticsha1(str:String, raw_output:Bool = false):String

@:value({ tv_usec : 0, tv_sec : 0 })staticsocket_select(read:NativeIndexedArray<Resource>, write:NativeIndexedArray<Resource>, other:NativeIndexedArray<Resource>, tv_sec:Int = 0, tv_usec:Int = 0):EitherType<Bool, Int>

@:value({ len : 0 })staticsocket_write(resource:Resource, buffer:String, len:Int = 0):EitherType<Bool, Int>

@:value({ prepend : false, throw_exception : true })staticspl_autoload_register(?autoload_function:(className:String) ‑> Void, throw_exception:Bool = true, prepend:Bool = false):Bool

@:value({ pad_String : " " })staticstr_pad(input:String, pad_length:Int, pad_String:String = " ", ?pad_type:Int):String

@:value({ split_length : 1 })staticstr_split(string:String, split_length:Int = 1):EitherType<Bool, NativeIndexedArray<String>>

@:value({ offset : -1, maxlength : -1 })staticstream_get_contents(handle:Resource, maxlength:Int = -1, offset:Int = -1):EitherType<String, Bool>

@:value({ tv_usec : 0 })staticstream_select(read:NativeArray, write:NativeArray, except:NativeArray, tv_sec:Int, tv_usec:Int = 0):Bool

@:value({ microseconds : 0 })staticstream_set_timeout(stream:Resource, seconds:Int, microseconds:Int = 0):Bool

@:value({ offset : 0 })staticstripos(haystack:String, needle:String, offset:Int = 0):EitherType<Bool, Int>

@:value({ offset : 0 })staticstrpos(haystack:String, needle:String, offset:Int = 0):EitherType<Bool, Int>

@:value({ offset : 0 })staticstrrpos(haystack:String, needle:String, offset:Int = 0):EitherType<Bool, Int>

@:value({ offset : 0 })staticstrspn(string:String, characters:String, offset:Int = 0, ?length:Int):Int

staticsubstr_count(haystack:String, needle:String, ?offset:Int, ?length:Int):Int

statictouch(filename:String, ?time:Int, ?atime:Int):Bool

staticusort(array:Ref<NativeArray>, value_compare_func:(Dynamic, Dynamic) ‑> Int):Bool

staticversion_compare(version1:String, version2:String):Int

staticversion_compare(version1:String, version2:String, comparisonOperator:String):Bool