3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function check($expected, $estado) { foreach ((array) $estado as $estado) { if ($expected === $estado) { return 'true'; } } return 'false'; } echo check(1, 1), "\n"; echo check(1, 2), "\n"; echo check(1, array(1, 2)), "\n"; echo check(1, array(2, 3)), "\n"; echo check(1, array(3, 2, 1)), "\n";
Output for 4.3.0 - 7.1.0
true false true false true