3v4l.org

run code in 300+ PHP versions simultaneously
<?php $cb = new \stdClass(...); var_dump($cb()); var_dump($cb());
Output for 8.1.0
Fatal error: Cannot create Closure for new expression in /in/7jQZE on line 3
Process exited with code 255.
Output for 8.0.0 - 8.0.13
Parse error: syntax error, unexpected token ")" in /in/7jQZE on line 3
Process exited with code 255.
Output for 7.3.13 - 7.3.33, 7.4.0 - 7.4.27
Parse error: syntax error, unexpected ')' in /in/7jQZE on line 3
Process exited with code 255.

preferences:
150.34 ms | 1339 KiB | 6 Q