3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $test = [1, "2", 3, "45", "a"]; var_dump(in_array("2", $test)); var_dump(in_array(8, $test)); var_dump(in_array(45, $test)); var_dump(in_array("3", $test));
Output for 5.4.2 - 7.3.1
bool(true) bool(false) bool(true) bool(true)
Output for 5.3.17 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/cs0ks on line 3
Process exited with code 255.