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('/(:\w+)/', 'jhkjh :fgfgfgfg :fgfg : : ffgg', $matches, PREG_SET_ORDER); print_r($matches);
based on UF4AC
Output for 4.3.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 ) )