3v4l.org

run code in 300+ PHP versions simultaneously
<?php preg_match_all('/(?J)(?<string>.*)1|(?<string>.*)2|(?<string>.*)3$/', "text2\npext3", $matches, PREG_SET_ORDER); var_dump($matches); preg_match_all('/(?J)(?<string>.*)1|(?<string>.*)2|(?<string>.*)3$/', "text2\npext3", $matches); var_dump($matches);
Output for git.master, git.master_jit, rfc.property-hooks
array(2) { [0]=> array(4) { [0]=> string(5) "text2" ["string"]=> string(4) "text" [1]=> string(0) "" [2]=> string(4) "text" } [1]=> array(5) { [0]=> string(5) "pext3" ["string"]=> string(4) "pext" [1]=> string(0) "" [2]=> string(0) "" [3]=> string(4) "pext" } } array(5) { [0]=> array(2) { [0]=> string(5) "text2" [1]=> string(5) "pext3" } ["string"]=> array(2) { [0]=> string(0) "" [1]=> string(4) "pext" } [1]=> array(2) { [0]=> string(0) "" [1]=> string(0) "" } [2]=> array(2) { [0]=> string(4) "text" [1]=> string(0) "" } [3]=> array(2) { [0]=> string(0) "" [1]=> string(4) "pext" } }

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:
67.82 ms | 407 KiB | 5 Q