3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $value = 'baz'; $haystack = array('foo', 'bar', true); print "\n"; print "--START--\n"; var_dump($value); var_dump($haystack); var_dump(in_array($value, $haystack, true)); var_dump(in_array($value, $haystack, false)); print "--END--\n";
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
--START-- string(3) "baz" array(3) { [0]=> string(3) "foo" [1]=> string(3) "bar" [2]=> bool(true) } bool(false) bool(true) --END--