- var_dump: documentation ( source)
- json_last_error_msg: documentation ( source)
- json_decode: documentation ( source)
- json_encode: documentation ( source)
- gzencode: documentation ( source)
- gzdecode: documentation ( source)
<?php
$parserOutput = [
'props' => [],
];
$tplDataRaw = '{"description": "Foo description", "label": "Foo", "baz": "Foo", "lorem": "Foo"}';
$tplData = gzencode($tplDataRaw, 9);
echo "raw-strlen: " . strlen($tplDataRaw) . "\n";
echo "comp-strlen: " . strlen($tplData) . "\n";
var_dump(json_decode(gzdecode($tplData)));
$parserOutput['props']['tplData'] = $tplData;
echo "\n\n";
var_dump(json_encode($parserOutput));
echo json_last_error_msg();