3v4l.org

run code in 300+ PHP versions simultaneously
<?php $s = 'group1 name=Elisa group2 name=John group3 name=Blah'; $r = ''; preg_match_all('~(group\d) (?:name=(\w*))~',$s,$matches,PREG_SET_ORDER); var_dump($matches); echo "----------DEFAULT------\n"; preg_match_all('~(group\d) (?:name=(\w*))~',$s,$matches); var_dump($matches);
Output for git.master, git.master_jit, rfc.property-hooks
array(3) { [0]=> array(3) { [0]=> string(17) "group1 name=Elisa" [1]=> string(6) "group1" [2]=> string(5) "Elisa" } [1]=> array(3) { [0]=> string(16) "group2 name=John" [1]=> string(6) "group2" [2]=> string(4) "John" } [2]=> array(3) { [0]=> string(16) "group3 name=Blah" [1]=> string(6) "group3" [2]=> string(4) "Blah" } } ----------DEFAULT------ array(3) { [0]=> array(3) { [0]=> string(17) "group1 name=Elisa" [1]=> string(16) "group2 name=John" [2]=> string(16) "group3 name=Blah" } [1]=> array(3) { [0]=> string(6) "group1" [1]=> string(6) "group2" [2]=> string(6) "group3" } [2]=> array(3) { [0]=> string(5) "Elisa" [1]=> string(4) "John" [2]=> string(4) "Blah" } }

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
60.25 ms | 403 KiB | 8 Q