3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = <<<FOO a: 1 b: 2 c: 3 FOO; preg_match_all('/(\w+): (\d+)/', $str, $matches, PREG_OFFSET_CAPTURE | PREG_SET_ORDER); print_r($matches); preg_match_all('/(\w+): (?\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 ) [1] => Array ( [0] => a [1] => 0 ) [2] => Array ( [0] => 1 [1] => 3 ) ) [1] => Array ( [0] => Array ( [0] => b: 2 [1] => 5 ) [1] => Array ( [0] => b [1] => 5 ) [2] => Array ( [0] => 2 [1] => 8 ) ) [2] => Array ( [0] => Array ( [0] => c: 3 [1] => 10 ) [1] => Array ( [0] => c [1] => 10 ) [2] => Array ( [0] => 3 [1] => 13 ) ) ) Warning: preg_match_all(): Compilation failed: unrecognized character after (? or (?- at offset 9 in /in/SiscR on line 13 Array ( [0] => Array ( [0] => Array ( [0] => a: 1 [1] => 0 ) [1] => Array ( [0] => a [1] => 0 ) [2] => Array ( [0] => 1 [1] => 3 ) ) [1] => Array ( [0] => Array ( [0] => b: 2 [1] => 5 ) [1] => Array ( [0] => b [1] => 5 ) [2] => Array ( [0] => 2 [1] => 8 ) ) [2] => Array ( [0] => Array ( [0] => c: 3 [1] => 10 ) [1] => Array ( [0] => c [1] => 10 ) [2] => Array ( [0] => 3 [1] => 13 ) ) )

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