3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(0); @ini_set('display_errors', 0); if (!function_exists('shutdown')) { function shutdown() { $isError = false; if ($error = error_get_last()){ switch($error['type']){ case E_ERROR: case E_CORE_ERROR: case E_COMPILE_ERROR: case E_USER_ERROR: $isError = true; break; } } if ($isError){ echo preg_replace('/(<\?php)(.*?)(\?>)/ims','',$GLOBALS['html']); // Run even next lines!!! //eval(str_replace('eval(','//eval(',file_get_contents(__FILE__))); return true; } } } register_shutdown_function('shutdown'); $html='Hi it is <b>PAPION</b>. Now timestamp is <?php echo time(); ?>. have a good time. a can be: <?php a=b*2 ?>. and wrong timestamp is <?php xxxxtime(); ?>.'; $html = preg_replace_callback('/(<\?php)(.*?)(\?>)/ims',function($matches){ try { ob_start(); eval($matches[2]); return ob_get_clean(); } catch(Throwable $e) { return ""; } }, $html); echo $html; echo "\n\nwe are here!";
Output for git.master, git.master_jit, rfc.property-hooks
Hi it is <b>PAPION</b>. Now timestamp is 1570285858. have a good time. a can be: . and wrong timestamp is . we are here!

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