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($mystring, array('s', 'e', 'm'))); print_r($your_array);
Output for 5.3.1 - 5.6.28, 7.0.0 - 7.1.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 hhvm-3.12.0
Notice: Undefined variable: mystring in /in/eYW5S on line 8 Warning: strpos() expects parameter 1 to be string, null given in /in/eYW5S on line 8 Array ( [0] => systematic [3] => mysterious )
Output for 5.0.4 - 5.3.0, hhvm-3.10.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 )