3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(E_ALL | E_STRICT); // Custom error handler. function handle_error($code, $message, $file, $line, $context) { $code = $code & error_reporting(); if ($code == 0) { // skip @ suppressed errors. return; } $errors = array( E_ERROR => 'E_ERROR', E_WARNING => 'E_WARNING', E_PARSE => 'E_PARSE', E_NOTICE => 'E_NOTICE', E_CORE_ERROR => 'E_CORE_ERROR', E_CORE_WARNING => 'E_CORE_WARNING', E_COMPILE_ERROR => 'E_COMPILE_ERROR', E_COMPILE_WARNING => 'E_COMPILE_WARNING', E_USER_ERROR => 'E_USER_ERROR', E_USER_WARNING => 'E_USER_WARNING', E_USER_NOTICE => 'E_USER_NOTICE', E_STRICT => 'E_STRICT', E_DEPRECATED => 'E_DEPRECATED', ); if (array_key_exists($code, $errors)) { $errname = $errors[$code]; } else { $errname = $code; } $error = "Error handler caught $errname with message \"" . $message . '" at ' . $file . ' line ' . $line . ".\n"; error_log($error); eval(<<<'PHP' function bla() { print "You should see this.\n"; } PHP ); bla($error); return; } set_error_handler('handle_error'); // This fails because bla.php can't be required in error handler: eval(<<<'PHP' namespace MyNamespace { abstract class AbstractFoo { abstract public static function foo(); // PHP 5.3 issues an E_STRICT here about abstract + static, even though it now supports static inheritance. } } PHP );
Output for git.master, git.master_jit, rfc.property-hooks

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