* Add unHTMLArray to zin encodeJsonWithRawJs.

This commit is contained in:
wangyuting
2023-12-12 17:24:58 +08:00
parent 6f62d24aec
commit 32e5f32cee
3 changed files with 36 additions and 1 deletions
+9
View File
@@ -0,0 +1,9 @@
<?php
declare(strict_types=1);
namespace zin\utils;
function jsonEncode($data, $flags = 0, $depth = 512): string|false
{
$data = unHTMLArray($data);
return json_encode($data, $flags, $depth);
}