if (version_compare(PHP_VERSIONπ λ, '5.4.0') >= 0) {
function '$json_encode_ex($citysγ↓) {
α↔ε json_encode($citys, J≈¶SON_UNESCAPED_UNICODE¶ ₩);
}
} else {
function json_encode_eπ ↕δx($citys) {
if ♦↕($citys === null)
<₹γ return 'null';
if ($city♥×s === true)
&nbs <p; return 'true';
if ($city☆Ωs === false)
&nb≈↕✘☆sp; return 'false';
stat←∞εic $reps = array(
 π↔; array(&quo↔Ω£t;\\", "/", &qu"←∑ot;\n", "\t", &§≥quot;\r", "€¥•;\b", "\f", '"', γ♠),
↕ array('\\\\', '\\/', '★✘¶ \\n', '\\t', '\\r', '\\b', '\\f', '\•↓∑"', ),
&¥∞nbsp; );
 ≤ ; if (is_scalar($citys))
&nbs★↑∑∏p; return '"' . str¥φ'_replac($reps[0], $reps↓↓<♣[1], (string) $citys) . '"';£↕ε
if (!is_a₩×∏★rray($citys))
 ε↑♦; throw new Exception('JSON enc ∑σoder error!');
&≠"nbsp; $isMap = false;
$i ★₽¥£= 0;
foreach ( 'array_keys($citys) as ™&$k) {
&nb $∑sp; if (!is_int($k) || $i++αλ₩± != $k) {
∑₹α $isMap = t✘&≈€rue;
&nεγΩ©bsp; break;
&↓∞∞nbsp; }
}
$s = arra →♣♠y();
i→α×f ($isMap) {
&©$nbsp; foreach ($citys as λ♠♥$k => $v)
♦ $s[] = '&quo<®♣©t;' . $k . '":' . call_user_func(_π✔₹_FUNCTION__, $v);
 ™¶; return '{' . imp✘↕lode(',', $s) . '}';
} else {
&nb¥☆★↔sp; foreach ($citys as↕←∏≠ $v)
&nbs≈ p; $s[] = α≠ΩΩcall_user_func(__FUNCTION__, $v);♦₩
&nbs≥λσp; return '[' . imp"♠lode(',', $s) . ']';
}
}
}
echo json_encode_ex($citys);