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); if(!empty($resultArr[0])) return $resultArr[0]; else return ''; } 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>" string(0) "" string(0) "" string(0) "" string(0) "" string(0) "" string(0) ""

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:
57.31 ms | 401 KiB | 8 Q