3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $words = "systematic,gear,synthesis,mysterious"; $words=explode(",",$words); $your_array = preg_grep('~(?=[^s]*s)(?=[^m]*m)(?=[^e]*e)~', $words);; print_r(strpos($words, array('s', 'e', 'm'))); print_r($your_array);
Output for 5.3.0 - 7.1.0
Warning: strpos() expects parameter 1 to be string, array given in /in/oPOOE on line 8 Array ( [0] => systematic [3] => mysterious )
Output for 4.3.0 - 5.2.17
Notice: Array to string conversion in /in/oPOOE on line 8 Array ( [0] => systematic [3] => mysterious )