3v4l.org

run code in 300+ PHP versions simultaneously
<?php //Source: https://bugs.php.net/bug.php?id=62437 function output($buffer) { global $object; return $buffer . $object; } ob_start('output'); $object = $_SERVER['HTTP_USER_AGENT'']; echo "foo "; $test = $object;
Output for 5.4.0 - 5.4.25
Parse error: syntax error, unexpected ''];' (T_ENCAPSED_AND_WHITESPACE), expecting ']' in /in/7n1Pg on line 11
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting ']' in /in/7n1Pg on line 11
Process exited with code 255.

preferences:
179.44 ms | 1395 KiB | 62 Q