3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $matches = array(); preg_match_all('/(:\w+)/', 'jhkjh :fgfg :fgfg : : ffgg', $matches); print_r($matches); $matches = array(); preg_match_all('/\s(:\w+)/', 'jhkjh :fgfgfgfg :fgfg : : ffgg', $matches, PREG_SET_ORDER); print_r($matches);
based on hGBc3
Output for 4.3.0 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
Array ( [0] => Array ( [0] => :fgfg [1] => :fgfg ) [1] => Array ( [0] => :fgfg [1] => :fgfg ) ) Array ( [0] => Array ( [0] => :fgfgfgfg [1] => :fgfgfgfg ) [1] => Array ( [0] => :fgfg [1] => :fgfg ) )
Output for hhvm-3.10.0

Process exited with code 153.