Sort.php
412 字节
<?php
namespace Lackoxygen\TiktokShop\Util;
class Sort
{
public static function kSort(array &$arr)
{
$kstring = true;
foreach ($arr as $k => &$v) {
if (!is_string($k)) {
$kstring = false;
}
if (is_array($v)) {
self::ksort($v);
}
}
if ($kstring) {
ksort($arr);
}
}
}