3v4l.org

run code in 300+ PHP versions simultaneously
<?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; ?>

preferences:
37.28 ms | 402 KiB | 5 Q