3v4l.org

run code in 300+ PHP versions simultaneously
<?php $variable = 'Hello World!'; // Использование оператора use function() use ($variable): string { return $variable; } // Альтернативный вариант, используя короткий синтаксис fn(): string => $variable;
Output for 8.0.0 - 8.0.9
Parse error: syntax error, unexpected token "fn" in /in/UIV0i on line 11
Process exited with code 255.
Output for 7.4.0 - 7.4.22
Parse error: syntax error, unexpected 'fn' (T_FN) in /in/UIV0i on line 11
Process exited with code 255.
Output for 7.3.0 - 7.3.29
Parse error: syntax error, unexpected 'fn' (T_STRING) in /in/UIV0i on line 11
Process exited with code 255.

preferences:
196.31 ms | 1395 KiB | 68 Q