3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface Foo { function bar($a, $b): void; } class Baz implements Foo { function bar($b, $c): void { var_dump([$b, $c]); } } call_user_func_array([(new Baz), 'bar'], ['c' => 123, 'b' => 456]);
Output for 8.0.0 - 8.0.12, 8.1rc1 - rc3
array(2) { [0]=> int(456) [1]=> int(123) }
Output for 7.3.0 - 7.3.31, 7.4.0 - 7.4.25
array(2) { [0]=> int(123) [1]=> int(456) }

preferences:
31.01 ms | 461 KiB | 5 Q