3v4l.org

run code in 300+ PHP versions simultaneously
<?php array_map(static fn($el) => $el, [1, 2]);
Output for 7.4.0 - 7.4.21, 8.0.0 - 8.0.8
Output for 7.3.0 - 7.3.29
Parse error: syntax error, unexpected 'fn' (T_STRING), expecting :: (T_PAAMAYIM_NEKUDOTAYIM) in /in/MGSE1 on line 3
Process exited with code 255.

preferences:
149.35 ms | 459 KiB | 5 Q