$cloner =
new VarCloner();
$cloner->
setMaxItems(-1
);
$dumper =
new CliDumper(null, null, CliDumper::DUMP_LIGHT_ARRAY | CliDumper::DUMP_STRING_LENGTH
);
$dumper->
setColors(false
);
VarDumper::
setHandler(function D
$var) use ($cloner,
$dumper) { $data =
$cloner->
cloneVar($var)->
withRefHandles(false
);
$dumper->
dump($data);
});
$server =
new DumpServer(getenv('VAR_DUMPER_SERVER'
));
$server->
start();
echo "READY\n";
$server->
listen(function DData
$data, array
$context,
$clientId) { dump((string) $data,
$context,
$clientId);
exit(0
);
});