peachpiecompiler / peachpie

PeachPie - the PHP compiler and runtime for .NET and .NET Core
https://www.peachpie.io
Apache License 2.0
2.31k stars 201 forks source link

call_user_func_array has slightly different behaviour in peachpie than in PHP #1076

Open noobsoftware opened 1 year ago

noobsoftware commented 1 year ago

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