3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo mb_substr('123abcdef', 3); echo "\n"; function endingCodeTag($content, $n) { $contentRest = mb_substr($content, $n); preg_match('/^\<code\s+lang(?:[\s]*>|\W[^\>]*\>)/u', $contentRest, $resultArr); return $resultArr[0]; } var_dump (endingCodeTag('<p> f g f rt e</p> <code lang>df g df = \(fsgfsd', 20)); var_dump (endingCodeTag('<p> f g f rt e</p> <code lang>df g df = \(fsgfsd', 18)); var_dump (endingCodeTag('<p> f g f rt e</p> <code lang>df g df = \(fsgfsd', 19)); var_dump (endingCodeTag('<p> f g f rt e</p> <code lang>df g df = \(fsgfsd', 21)); var_dump (endingCodeTag('<p> f g f rt e</p> <code lang>df g df = \(fsgfsd', 22)); var_dump (endingCodeTag('<p> f g f rt e</p> <code lang>df g df = \(fsgfsd', 23)); var_dump (endingCodeTag('<p> f g f rt e</p> <code lang>df g df = \(fsgfsd', 24));
Output for git.master, git.master_jit, rfc.property-hooks
abcdef string(11) "<code lang>" Warning: Undefined array key 0 in /in/9ik35 on line 10 NULL Warning: Undefined array key 0 in /in/9ik35 on line 10 NULL Warning: Undefined array key 0 in /in/9ik35 on line 10 NULL Warning: Undefined array key 0 in /in/9ik35 on line 10 NULL Warning: Undefined array key 0 in /in/9ik35 on line 10 NULL Warning: Undefined array key 0 in /in/9ik35 on line 10 NULL

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:
61.01 ms | 402 KiB | 8 Q