3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function output($buffer) { global $object, $string, $int, $float, $array; $ret_val = array($string, $object->bar, $int, sprintf("%.2f", $float), $array[0]); return implode(" ", $ret_val); } ob_start('output'); $object = new stdClass(); $object->bar = "bar"; $string = "foo"; $int = 1; $float = 2.0; $array = array('array'); $test = $object; ?>
Output for 4.3.0 - 7.1.0
foo bar 1 2.00 array