3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $matches = []; $str = 'fooxbarx'; preg_match('/(^|\\s)x/mu', $str, $matches, PREG_OFFSET_CAPTURE, 0); var_dump($str); var_dump($matches);
based on 2vffn
Output for 5.6.30, hhvm-3.18.5 - 3.22.0, 7.0.30 - 7.3.0beta1
string(8) "fooxbarx" array(0) { }