peachpie icon indicating copy to clipboard operation
peachpie copied to clipboard

call_user_func_array has slightly different behaviour in peachpie than in PHP

Open noobsoftware opened this issue 2 years ago • 0 comments

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

noobsoftware avatar Nov 06 '22 01:11 noobsoftware