3v4l.org

run code in 300+ PHP versions simultaneously
<?php preg_match_all('/^([a-z0-9_]+)|::([a-z0-9_]+)/', 'lol::second::third::fourth', $matches, PREG_OFFSET_CAPTURE); var_dump($matches);
Output for git.master, git.master_jit, rfc.property-hooks
array(3) { [0]=> array(4) { [0]=> array(2) { [0]=> string(3) "lol" [1]=> int(0) } [1]=> array(2) { [0]=> string(8) "::second" [1]=> int(3) } [2]=> array(2) { [0]=> string(7) "::third" [1]=> int(11) } [3]=> array(2) { [0]=> string(8) "::fourth" [1]=> int(18) } } [1]=> array(4) { [0]=> array(2) { [0]=> string(3) "lol" [1]=> int(0) } [1]=> array(2) { [0]=> string(0) "" [1]=> int(-1) } [2]=> array(2) { [0]=> string(0) "" [1]=> int(-1) } [3]=> array(2) { [0]=> string(0) "" [1]=> int(-1) } } [2]=> array(4) { [0]=> array(2) { [0]=> string(0) "" [1]=> int(-1) } [1]=> array(2) { [0]=> string(6) "second" [1]=> int(5) } [2]=> array(2) { [0]=> string(5) "third" [1]=> int(13) } [3]=> array(2) { [0]=> string(6) "fourth" [1]=> int(20) } } }

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:
44.95 ms | 403 KiB | 8 Q