3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $options = array( 'index1' => 'html', 'index2' => 'html', 'index3' => 'slide', 'index4' => 'tab', 'index5' => array(123), ); $lookfor = array('slide', 'tab'); $found = array_intersect($options, $lookfor); print_r($found);
Output for 7.0.0 - 7.1.0
Notice: Array to string conversion in /in/i8iPS on line 11 Notice: Array to string conversion in /in/i8iPS on line 11 Notice: Array to string conversion in /in/i8iPS on line 11 Notice: Array to string conversion in /in/i8iPS on line 11 Notice: Array to string conversion in /in/i8iPS on line 11 Array ( [index3] => slide [index4] => tab )
Output for 5.4.0 - 5.6.28
Notice: Array to string conversion in /in/i8iPS on line 11 Notice: Array to string conversion in /in/i8iPS on line 11 Notice: Array to string conversion in /in/i8iPS on line 11 Notice: Array to string conversion in /in/i8iPS on line 11 Array ( [index3] => slide [index4] => tab )
Output for 4.3.0 - 5.3.29
Array ( [index3] => slide [index4] => tab )