3v4l.org

run code in 300+ PHP versions simultaneously
<?php $texts[] = <<<TEXT EXCLUDE this entire line include this line even this to EXCLUDE and EXCLUDE this and this as single match and EXCLUDE this line TEXT; $texts[] = <<<TEXT EXCLUDE this entire line and EXCLUDE this and this as single match TEXT; $texts[] = <<<TEXT EXCLUDE this entire line even this to EXCLUDE and EXCLUDE this and EXCLUDE this line TEXT; $texts[] = <<<TEXT include this line even this to EXCLUDE TEXT; var_export( preg_replace('/(\R)?.*\bEXCLUDE\b.*(?(1)|\R?)/', '', $texts) );
Output for git.master, git.master_jit, rfc.property-hooks
array ( 0 => 'include this line and this as single match', 1 => 'and this as single match', 2 => '', 3 => 'include this line', )

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:
26.93 ms | 405 KiB | 5 Q