Warning : untyped __call__ is deprecated. Use php.Syntax instead

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:

1 Like

can i use in my own classes?

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)

1 Like

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