3v4l.org

run code in 200+ 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($mystring, array('s', 'e', 'm'))); print_r($your_array);
Output for 5.3.1 - 7.2.0
Notice: Undefined variable: mystring in /in/eYW5S on line 8 Warning: strpos(): needle is not a string or an integer in /in/eYW5S on line 8 Array ( [0] => systematic [3] => mysterious )
Output for 5.0.4 - 5.3.0
Notice: Undefined variable: mystring in /in/eYW5S on line 8 Array ( [0] => systematic [3] => mysterious )
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: mystring in /in/eYW5S on line 8 Array ( [0] => systematic [3] => mysterious )