3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test(string str){ if(strpos(str, ">") !== false) { $exp = explode(">", str); return ($exp[0] > $exp[1]); } } var_dump(test("1.2 > 2"));
Output for 5.4.0 - 5.4.26
Parse error: syntax error, unexpected 'str' (T_STRING), expecting '&' or variable (T_VARIABLE) in /in/qlYoH on line 3
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_STRING, expecting '&' or T_VARIABLE in /in/qlYoH on line 3
Process exited with code 255.

preferences:
208.4 ms | 1395 KiB | 63 Q