3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = <<<FOO a: 1 b: 2 c: 3 FOO; preg_match_all('/(?P<name>\w+): (?P<digit>\d+)/', $str, $matches, PREG_OFFSET_CAPTURE | PREG_SET_ORDER); print_r($matches); preg_match_all('/(?P<name>\w+): (?P<digit>\d+)/', $str, $matches, PREG_SET_ORDER); print_r($matches);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => Array ( [0] => Array ( [0] => a: 1 [1] => 0 ) [name] => Array ( [0] => a [1] => 0 ) [1] => Array ( [0] => a [1] => 0 ) [digit] => Array ( [0] => 1 [1] => 3 ) [2] => Array ( [0] => 1 [1] => 3 ) ) [1] => Array ( [0] => Array ( [0] => b: 2 [1] => 5 ) [name] => Array ( [0] => b [1] => 5 ) [1] => Array ( [0] => b [1] => 5 ) [digit] => Array ( [0] => 2 [1] => 8 ) [2] => Array ( [0] => 2 [1] => 8 ) ) [2] => Array ( [0] => Array ( [0] => c: 3 [1] => 10 ) [name] => Array ( [0] => c [1] => 10 ) [1] => Array ( [0] => c [1] => 10 ) [digit] => Array ( [0] => 3 [1] => 13 ) [2] => Array ( [0] => 3 [1] => 13 ) ) ) Array ( [0] => Array ( [0] => a: 1 [name] => a [1] => a [digit] => 1 [2] => 1 ) [1] => Array ( [0] => b: 2 [name] => b [1] => b [digit] => 2 [2] => 2 ) [2] => Array ( [0] => c: 3 [name] => c [1] => c [digit] => 3 [2] => 3 ) )

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:
42.63 ms | 409 KiB | 8 Q