3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $filter = 'as'; if( !empty($filter['online']) or in_array('online', $filter['interest']) ) { echo('a'); }
Output for 5.4.0 - 5.6.28, 7.0.0 - 7.1.0
Warning: Illegal string offset 'interest' in /in/70k3s on line 5 Warning: in_array() expects parameter 2 to be array, string given in /in/70k3s on line 5
Output for hhvm-3.10.0 - 3.12.0
Warning: in_array() expects parameter 2 to be an array or collection in /in/70k3s on line 5
Output for 4.3.0 - 4.4.9, 5.0.3 - 5.3.29
a
Output for 5.0.0 - 5.0.2
Warning: in_array(): Wrong datatype for second argument in /in/70k3s on line 5