3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(E_ALL); function callbackFunction() {} class Foo { public function applyA(callable $errorCallback = null, bool $showProgress) {} } $foo = new Foo; $foo->applyA(showProgress: true);
Output for 8.1.17 - 8.1.29, 8.2.10 - 8.2.23, 8.3.0 - 8.3.11
Fatal error: Uncaught ArgumentCountError: Foo::applyA(): Argument #1 ($errorCallback) not passed in /in/dLoTl:7 Stack trace: #0 /in/dLoTl(11): Foo->applyA(NULL, true) #1 {main} thrown in /in/dLoTl on line 7
Process exited with code 255.
Output for 8.0.28

preferences:
59.04 ms | 406 KiB | 5 Q