3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $str = 'hello world'; preg_match_all('/^(\w+)\s*(.*)$/', $str, $matches, PREG_SET_ORDER); var_dump($matches);
Output for 4.3.0 - 7.2.0
array(1) { [0]=> array(3) { [0]=> string(11) "hello world" [1]=> string(5) "hello" [2]=> string(5) "world" } }