W3cubDocs

/Haxe PHP

Lib

package php

Available on php

Platform-specific PHP Library. Provides some platform-specific functions for the PHP target, such as conversion from Haxe types to native types and vice-versa.

Static methods

@:has_untyped static associativeArrayOfHash (hash:StringMap<Dynamic>):NativeArray

@:has_untyped static associativeArrayOfObject (ob:Dynamic):NativeArray

@:has_untyped static dump (v:Dynamic):Void

Displays structured information about one or more expressions that includes its type and value. Arrays and objects are explored recursively with values indented to show structure.

@:has_untyped static extensionLoaded (name:String):Unknown

Find out whether an extension is loaded.

@:has_untyped static getClasses ():{}

@:has_untyped static hashOfAssociativeArray<T> (arr:NativeArray):Map<String, T>

@:has_untyped static isCli ():Bool

@:has_untyped static loadLib (pathToLib:String):Void

Loads types defined in the specified directory.

@:has_untyped static mail (to:String, subject:String, message:String, ?additionalHeaders:String, ?additionalParameters:String):Bool

See the documentation for the equivalent PHP function for details on usage: http://php.net/manual/en/function.mail.php

Parameters:

to
subject
message
?additionalHeaders
null

?additionalParameters

@:has_untyped static objectOfAssociativeArray (arr:NativeArray):Dynamic

@:has_untyped static print (v:Dynamic):Void

Print the specified value on the default output.

@:has_untyped static printFile (file:String):Unknown

Output file content from the given file name.

static println (v:Dynamic):Void

Print the specified value on the default output followed by a newline character.

@:has_untyped static rethrow (e:Dynamic):Void

For neko compatibility only.

@:has_untyped static serialize (v:Dynamic):String

Serialize using native PHP serialization. This will return a binary String that can be stored for long term usage.

@:has_untyped static inline toHaxeArray (a:NativeArray):Array<Dynamic>

@:has_untyped static toPhpArray (a:Array<Dynamic>):NativeArray

@:has_untyped static unserialize (s:String):Dynamic

Unserialize a String using native PHP serialization. See php.Lib.serialize().

© 2005–2018 Haxe Foundation
Licensed under a MIT license.
https://api.haxe.org/php/Lib.html