3v4l.org

run code in 300+ PHP versions simultaneously
<?php function x($value, $pattern) { $v1 = preg_match("\x01^($pattern)\\z\x01u", $value); echo "1) $value = " . ($v1 ? "A":"N") . "\n"; $v2 = preg_match("#($pattern)#", $value); echo "2) $value = " . ($v2 ? "A":"N") . "\n"; echo $v1 != $v2 ? "!!! mismatch\n---\n" : "----\n"; } x("xaaax", '(.)\1{2,}'); x("xaaax", '(.)\2{2,}'); x("xaaax", '(?:(.)\1{2,})'); x("xaaax", '(?:(.)\2{2,})');
Output for git.master, git.master_jit, rfc.property-hooks
1) xaaax = N 2) xaaax = N ---- 1) xaaax = N 2) xaaax = A !!! mismatch --- 1) xaaax = N 2) xaaax = N ---- 1) xaaax = N 2) xaaax = A !!! mismatch ---

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:
36.93 ms | 405 KiB | 9 Q