3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $array1 = "a_b_c"; $array2 = array("a","c","d","e"); $promotion = explode($array1, "_"); foreach($promotion as $promo) { if(in_array($promo,$array2)) { print_r($promo); } }
Output for 4.3.0 - 7.1.0