3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $var = Array( [0] => Array ( ['id'] => 1, ['box'] => 0 ), [2] => Array ( ['id'] => 2, ['box'] => 0 ), [3] => Array ( ['id'] => 3, ['box'] => 1 ) ); echo $index = array_search(array_column($var, 'box'), 1);
based on h5q5T
Output for 7.0.0 - 7.0.5
Fatal error: Illegal offset type in /in/s2ad3 on line 8
Process exited with code 255.
Output for 5.5.0 - 5.6.28
Warning: Illegal offset type in /in/s2ad3 on line 6 Warning: Illegal offset type in /in/s2ad3 on line 8 Warning: Illegal offset type in /in/s2ad3 on line 8 Warning: Illegal offset type in /in/s2ad3 on line 12 Warning: Illegal offset type in /in/s2ad3 on line 14 Warning: Illegal offset type in /in/s2ad3 on line 14 Warning: Illegal offset type in /in/s2ad3 on line 18 Warning: Illegal offset type in /in/s2ad3 on line 20 Warning: Illegal offset type in /in/s2ad3 on line 21 Warning: array_search() expects parameter 2 to be array, integer given in /in/s2ad3 on line 23