3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function output($buffer) { global $object; return $buffer . $object->bar; } ob_start('output'); $object = new stdClass(); $object->bar = "bar"; echo "foo "; // $test = $object;
Output for 5.2.0 - 7.1.0
foo
Output for 4.3.0 - 5.0.5, 5.1.1 - 5.1.6
foo bar
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/pM77t on line 16
Process exited with code 255.