3v4l.org

run code in 300+ PHP versions simultaneously
<?php function f($errno, $errstr, $errfile, $errline ) { echo $errno, ": ", $errstr, " in ", $errfile, " on ", $errline, "\n"; return true; } function exception_error_handler($errno, $errstr, $errfile, $errline ) { throw new ErrorException($errstr); } ++$lorem; set_error_handler('f'); ++$ipsum; set_error_handler(function ($errno, $errstr, $errfile, $errline) { echo $errno, ": ", $errstr, " in ", $errfile, " on ", $errline, "\n"; return true; }); ++$dolor; set_error_handler("exception_error_handler"); try { preg_match("/foo(+/", null); echo "+valid\n"; } catch (ErrorException $e) { echo "-fail: ", $e->getMessage(), "\n"; } restore_error_handler(); ++$sit; restore_error_handler(); ++$amet; restore_error_handler(); ++$consectepture;
Output for git.master, git.master_jit, rfc.property-hooks
Warning: Undefined variable $lorem in /in/08JkW on line 11 2: Undefined variable $ipsum in /in/08JkW on 15 2: Undefined variable $dolor in /in/08JkW on 22 -fail: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated 2: Undefined variable $sit in /in/08JkW on 34 2: Undefined variable $amet in /in/08JkW on 38 Warning: Undefined variable $consectepture in /in/08JkW on line 42

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