3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo (int bar) : int {}
Output for 5.6.7 - 5.6.14
Parse error: syntax error, unexpected 'bar' (T_STRING), expecting variable (T_VARIABLE) in /in/OPBri on line 3
Process exited with code 255.
Output for 5.4.2 - 5.4.45, 5.5.24 - 5.5.30
Parse error: syntax error, unexpected 'bar' (T_STRING), expecting '&' or variable (T_VARIABLE) in /in/OPBri on line 3
Process exited with code 255.

preferences:
201.4 ms | 1395 KiB | 65 Q