3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * When there's no other way than dying, at least do it nicely. * @param string $message The message to show. * @param string|null $file File where problem occured (leave empty to autodetect). * @param integer $line Line of code causing the issue. */ function kbm_fatal($message, $file='', $line=0){ if(!$file){ $trace = debug_backtrace(); echo '<pre>';print_r($trace);die; } die("<div style='font: bold 12px Consolas; color: #A00; background: #FFF; padding: 3px; margin: 1px;'>FATAL: $message [$file:$line]</div>"); } function test(){ kbm_fatal('cheese'); } test();
Output for git.master, git.master_jit, rfc.property-hooks
<pre>Array ( [0] => Array ( [file] => /in/o2pvh [line] => 20 [function] => kbm_fatal [args] => Array ( [0] => cheese ) ) [1] => Array ( [file] => /in/o2pvh [line] => 23 [function] => test [args] => Array ( ) ) )

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