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({ 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({ 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({ use_include_path : false })staticfopen(filename:String, mode:String, use_include_path:Bool = false, ?context:Resource):EitherType<Bool, Resource>

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

@: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({ replace : true })staticheader(string:String, replace:Bool = true, ?http_response_code:Int):Void

@: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>

@: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_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({ 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 })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>

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

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