<?php
$json = array(
"sn" => CAS0510000072,
"name" => 内网测试环境,
"engine" => array(
"pkt_uri" => "https://192.168.1.224:7088/engine/fred.tar.gz",
"md5" => "e6e21fc448db4a5a57087df0060b8292",
"title" => "fred"
),
"area" => array(
"pkt_uri" => "https://192.168.1.224:7088/area/东南地区_beta.tar.gz",
"md5" => "4b6570bdae1fee83ef5ff2ab725eed4e",
"title" => "东南地区_beta"
),
"account" => array(
"pkt_uri" => "https://192.168.1.224:7088/account.conf",
"md5" => "481284bd6c5a0481c1f1b32afd7c8aae",
"title" => "account"
),
"work" => "start"
);
$encoded = json_encode($json);
var_dump($encoded);
$unescaped = preg_replace_callback('/\\\u(\w{4})/', function ($matches) {
return html_entity_decode('&#x' . $matches[1] . ';', ENT_COMPAT, 'UTF-8');
}, $encoded);
echo $unescaped;
preferences:
50.5 ms | 402 KiB | 5 Q