peachpie
peachpie copied to clipboard
call_user_func_array has slightly different behaviour in peachpie than in PHP
call_user_func_array
public function test_fun($value=NULL, $b=false, $c=true) {
debug::debug($value);
debug::debug($b);
debug::debug($c);
}
public function init_app() : void {
$res = call_user_func_array([$this, 'test_fun'], ['test']);
}
When calling in PHP running on XAMPP this results in:
string(4) "test" bool(false) bool(true)
In PeachPie:
string(4) "test"
NULL
NULL
I'm using PHP 8.1 on XAMPP