我有以下 PHP stdclass 对象数组(实际上我的有数百个索引,但目标是相同的)并且我无法找到最有效的方法来使用 PHP 以编程方式确定哪个 stdclass 对象最常出现在数组中。
例如,如果索引 0 处的标准类对象最常出现(显然它没有出现),那么我想回显 "1 , 1024" 或类似的东西。
大批 ( [0] => 标准类对象 ( [一] => 1 [b] => 1024 ) [1] => 标准类对象 ( [a] => 4 [b] => 4096 ) [2] => 标准类对象 ( [a] => 4 [b] => 4096 ) [3] => 标准类对象 ( [a] => 4 [b] => 4096 ) [4] => 标准类对象 ( [a] => 4 [b] => 4096 ) [5] => 标准类对象 ( [a] => 4 [b] => 4096 ) [6] => 标准类对象 ( [a] => 4 [b] => 4096 ) [7] => 标准类对象 ( [a] => 4 [b] => 6144 ) [8] => 标准类对象 ( [a] => 4 [b] => 6144 ) [9] => 标准类对象 ( [一] => 8 [b] => 6144 ) [10] => 标准类对象 ( [一] => 8 [b] => 6144 ) [11] => 标准类对象 ( [一] => 8 [b] => 8192 ) [12] => 标准类对象 ( [一] => 8 [b] => 8192 ) [13] => 标准类对象 ( [一] => 8 [b] => 8192 ) [14] => 标准类对象 ( [一] => 8 [b] => 8192 ) )
谢谢!