3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $array = array( 'This one I need 1', 'This one I DO NOT need 1', 'This one I need 2', 'This one I DO NOT need 2', 'That one I needed 1', 'This one I need 3', ); foreach($array AS $val){ // var_dump(stripos($val, 'This one I need')); var_dump($val);var_dump('This one I need'); }
based on oUbM2
Output for 4.3.0 - 7.2.0
string(17) "This one I need 1" string(15) "This one I need" string(24) "This one I DO NOT need 1" string(15) "This one I need" string(17) "This one I need 2" string(15) "This one I need" string(24) "This one I DO NOT need 2" string(15) "This one I need" string(19) "That one I needed 1" string(15) "This one I need" string(17) "This one I need 3" string(15) "This one I need"