3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pattern = "/(?(DEFINE)(?<p1>BEGIN)(?<p2>END))((?&p1)|(?&p2))+/"; $subject = <<<EOF BEGIN something(); BEGIN if (false) echo "e"; END END EOF; $count = preg_match_all($pattern, $subject, $matches); var_dump($count, $matches);
Output for git.master, git.master_jit, rfc.property-hooks
int(4) array(6) { [0]=> array(4) { [0]=> string(5) "BEGIN" [1]=> string(5) "BEGIN" [2]=> string(3) "END" [3]=> string(3) "END" } ["p1"]=> array(4) { [0]=> string(0) "" [1]=> string(0) "" [2]=> string(0) "" [3]=> string(0) "" } [1]=> array(4) { [0]=> string(0) "" [1]=> string(0) "" [2]=> string(0) "" [3]=> string(0) "" } ["p2"]=> array(4) { [0]=> string(0) "" [1]=> string(0) "" [2]=> string(0) "" [3]=> string(0) "" } [2]=> array(4) { [0]=> string(0) "" [1]=> string(0) "" [2]=> string(0) "" [3]=> string(0) "" } [3]=> array(4) { [0]=> string(5) "BEGIN" [1]=> string(5) "BEGIN" [2]=> string(3) "END" [3]=> string(3) "END" } }

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