3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $array[0]['d'] = 'd1'; $array[0]['a'] = 'a1'; $array[1]['d'] = 'd2'; $array[1]['a'] = 'a2'; $array[2]['d'] = 'd3'; $array[2]['a'] = 'a3'; $array[3]['d'] = 'd1'; $array[3]['a'] = 'a1'; print_r($array); $keys = array_keys($array,"a1"); print_r($keys); ?>
based on ShitD
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.2.0
Array ( [0] => Array ( [d] => d1 [a] => a1 ) [1] => Array ( [d] => d2 [a] => a2 ) [2] => Array ( [d] => d3 [a] => a3 ) [3] => Array ( [d] => d1 [a] => a1 ) ) Array ( )