3v4l.org

run code in 300+ PHP versions simultaneously
<?php function ciao() { $out = '<pre>'; $args = func_get_args(); if(!empty($args)) { // var_export() causes fatal errors on recursion... ob_start(); ini_set('xdebug.var_display_max_depth', 4); var_dump($args); $out .= ob_get_contents()."\n\n"; ob_end_clean(); } $out .= get_backtrace(1); die($out); } class A { function B() { while (ob_get_level() > 1) ob_end_flush(); // store possible trailing content $content = ob_get_clean(); // start an output buffer which cannot be flushed (3rd parameter is false) // callback function get all output and corrects Content-Length header ob_start(function($buffer) { ciao($buffer); }, 0, false); } } $a = new A; $a->B();
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: ob_start(): Cannot use output buffering in output buffering display handlers in /in/O35ZA on line 12
Process exited with code 255.

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