3v4l.org

run code in 300+ PHP versions simultaneously
<?php $foo = [ "int" => function($a, $b, $c) { var_dump($a, $b, $c); } ]; $foo[int](1,2,3);
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.31, 8.2.0 - 8.2.27, 8.3.0 - 8.3.16, 8.4.1 - 8.4.3
Fatal error: Uncaught Error: Undefined constant "int" in /in/qdn2r:9 Stack trace: #0 {main} thrown in /in/qdn2r on line 9
Process exited with code 255.
Output for 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33
Warning: Use of undefined constant int - assumed 'int' (this will throw an Error in a future version of PHP) in /in/qdn2r on line 9 int(1) int(2) int(3)
Output for 5.5.24 - 5.5.35, 5.6.8 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.33
Notice: Use of undefined constant int - assumed 'int' in /in/qdn2r on line 9 int(1) int(2) int(3)

preferences:
135.88 ms | 409 KiB | 5 Q