3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test((int) $id) { echo $id; } test(1);
Output for 5.4.13
Parse error: syntax error, unexpected '(int)' (int) (T_INT_CAST), expecting '&' or variable (T_VARIABLE) in /in/aMBM0 on line 3
Process exited with code 255.
Output for 5.4.0 - 5.4.12
Parse error: syntax error, unexpected '(int)' (int) (T_INT_CAST), expecting '&' or variable (T_VARIABLE) in GvbE9 on line 3
Process exited with code 255.
Output for 5.3.23
Parse error: syntax error, unexpected T_INT_CAST, expecting '&' or T_VARIABLE in /in/aMBM0 on line 3
Process exited with code 255.
Output for 5.3.0 - 5.3.22
Parse error: syntax error, unexpected T_INT_CAST, expecting '&' or T_VARIABLE in GvbE9 on line 3
Process exited with code 255.

preferences:
173.42 ms | 1395 KiB | 45 Q