3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $arr = array( 'toto' => array( 'foo' => 'foofoo', 'bar' => 'barbar', ), 'titi' => array( 'foo' => 'foofoo', 'bar' => 'barbar', ), ); var_dump(array_keys($arr)); var_dump(in_array('toto', $arr)); var_dump(in_array('toto', array_keys($arr)));
based on 4ImrF
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
array(2) { [0]=> string(4) "toto" [1]=> string(4) "titi" } bool(false) bool(true)