X::output(1, true, null, 'foo', ['a', 'b'], (object)['a' => 1, 'b' => ['c' => 2, 'd' => 3]]); // (string) // "1 // true // null // foo // // [ // "a", // "b", // ] // // // { // "a": 1, // "b": { // "c": 2, // "d": 3, // }, // }
"
function()
{
$wrote = false;
foreach (func_get_args() as $a) {
if ($a === null) {
$st = 'null';
}
elseif ($a === true) {
$st = 'true';
}
elseif ($a === false) {
$st = 'false';
}
elseif (\bbn\Str::isNumber($a)) {
$st = $a;
}
elseif (!is_string($a)) {
$st = self::getDump($a);
}
else {
$st = $a;
}
if ($st) {
$wrote = true;
echo $st.PHP_EOL;
}
}
if ($wrote) {
//ob_end_flush();
}
}