3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo preg_replace_callback('#\\##', fn() => invalid(), 'a b'); echo 'f';
based on QScj8
Output for 7.4.0 - 7.4.12, 8.0.0
a bf
Output for 7.3.0 - 7.3.24
Parse error: syntax error, unexpected '=>' (T_DOUBLE_ARROW), expecting ')' in /in/JY7Dd on line 3
Process exited with code 255.
Output for 7.2.0 - 7.2.34
Parse error: syntax error, unexpected '=>' (T_DOUBLE_ARROW), expecting ',' or ')' in /in/JY7Dd on line 3
Process exited with code 255.