3v4l.org

run code in 300+ PHP versions simultaneously
<?php if (version_compare(PHP_VERSION, '5.4.0') >= 0){ preg_match_all('/(?:\e\[(.*?)m|(\x08))/',"foob\e[31;41ma\e[0mr\x08\x08\x08 ", $matches, PREG_OFFSET_CAPTURE); } else { preg_match_all('/(?:\\\e\[(.*?)m|(\x08))/','foob\e[31;41ma\e[0mr\x08\x08\x08 ', $matches, PREG_OFFSET_CAPTURE); } var_dump($matches);
Output for git.master, git.master_jit, rfc.property-hooks
array(3) { [0]=> array(5) { [0]=> array(2) { [0]=> string(8) "" [1]=> int(4) } [1]=> array(2) { [0]=> string(4) "" [1]=> int(13) } [2]=> array(2) { [0]=> string(1) "" [1]=> int(18) } [3]=> array(2) { [0]=> string(1) "" [1]=> int(19) } [4]=> array(2) { [0]=> string(1) "" [1]=> int(20) } } [1]=> array(5) { [0]=> array(2) { [0]=> string(5) "31;41" [1]=> int(6) } [1]=> array(2) { [0]=> string(1) "0" [1]=> int(15) } [2]=> array(2) { [0]=> string(0) "" [1]=> int(-1) } [3]=> array(2) { [0]=> string(0) "" [1]=> int(-1) } [4]=> array(2) { [0]=> string(0) "" [1]=> int(-1) } } [2]=> array(5) { [0]=> array(2) { [0]=> string(0) "" [1]=> int(-1) } [1]=> array(2) { [0]=> string(0) "" [1]=> int(-1) } [2]=> array(2) { [0]=> string(1) "" [1]=> int(18) } [3]=> array(2) { [0]=> string(1) "" [1]=> int(19) } [4]=> array(2) { [0]=> string(1) "" [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:
31.66 ms | 409 KiB | 5 Q