How to call php function?
in example - how to rewrite this
untyped __call__('str_repeat', ' . ', level);
with php.Syntax ?
How to call php function?
in example - how to rewrite this
untyped __call__('str_repeat', ' . ', level);
with php.Syntax ?
php.Syntax.code('str_repeat({0}, {1})', ' . ', level);
Also str_repeat
extern is available in php.Global.str_repeat
:
can i use in my own classes?
@:phpGlobal
extern class CustomPhpFunctions {
static function readfile(path:String):Void;
}
Yes, you can.
How do I call ob_flush or set_time_limit?
php.Global.ob_flush()
/ php.Global.set_time_limit(seconds)
As addition, if you create/use an import.hx file, you can add import php.Global.*
there, then you can just write set_time_limit(10)
anywhere in your code
© 2018-2020 Haxe Foundation - Powered by Discourse