3v4l.org

run code in 300+ PHP versions simultaneously
<?php // just do this... $matches = array(); preg_match_all('/\s(:\w+)/', 'jhkjh :fgfgfgfg :fgfg : : ffgg', $matches); print_r($matches); // we could wrap it in a function that eliminates the pass by reference, and/or use Flux (https://github.com/selvinortiz/flux) and extend it $matches = array(); preg_match_all('/\s(:\w+)/', 'jhkjh :fgfgfgfg :fgfg : : ffgg', $matches, PREG_SET_ORDER); print_r($matches);

preferences:
78.5 ms | 402 KiB | 5 Q