3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function test_func($value) { return array_search($value, array(0, 1, true, false, "1", "0", "true", "false"), true) == true; } var_dump(test_func(1)); var_dump(test_func(false)); var_dump(test_func("1sdf qsdf"));
Output for 4.3.0 - 5.6.30, hhvm-3.10.1 - 3.11.1, hhvm-3.13.2, hhvm-3.17.3, 7.0.0 - 7.2.0
bool(true) bool(true) bool(false)
Output for hhvm-3.12.14, hhvm-3.15.4

Process exited with code 137.