@ 2014-03-02T06:24:57Z <?php
$json='{
"rec_items": [
{
"classes": "玄幻",
"gid": 6326585,
"author": "我吃西红柿",
"nid": 10079306,
"last_sort": 841,
"last_chapter_name": "第二十五卷 第六章 一扫而空",
"sub_count": 5364424,
"novel_name": "莽荒纪",
"last_update_time": 1393679718826
},
{
"classes": "玄幻",
"gid": 6109786,
"author": "唐家三少",
"nid": 10079046,
"last_sort": 1153,
"last_chapter_name": "第三百八十一章 开始行动(中)",
"sub_count": 3933876,
"novel_name": "绝世唐门",
"last_update_time": 1393681654511
},
{
"classes": "玄幻",
"gid": 10645516,
"author": "辰东",
"nid": 12649548,
"last_sort": 478,
"last_chapter_name": "第四百三十二章 扛媳妇回村",
"sub_count": 1422482,
"novel_name": "完美世界",
"last_update_time": 1393681655610
},
{
"classes": "玄幻",
"gid": 4711723,
"author": "只是小虾米",
"nid": 12629406,
"last_sort": 2603,
"last_chapter_name": "第2588章 苏醒!",
"sub_count": 2841630,
"novel_name": "武逆",
"last_update_time": 1393605899300
},
{
"classes": "玄幻",
"gid": 3701669,
"author": "苍笑天",
"nid": 8583556,
"last_sort": 3427,
"last_chapter_name": "第两千两百二十五章 孔雀王!",
"sub_count": 606473,
"novel_name": "武破九霄",
"last_update_time": 1391279170831
},
{
"classes": "玄幻",
"gid": 8141499,
"author": "风凌天下",
"nid": 9212380,
"last_sort": 2579,
"last_chapter_name": "第五百二十六章 九劫、天帝之战【七】",
"sub_count": 3082857,
"novel_name": "傲世九重天",
"last_update_time": 1393677692614
}
],
"cate_book_items": [
{
"classes": "玄幻",
"gid": 4711723,
"author": "只是小虾米",
"nid": 12629406,
"last_sort": 2603,
"last_chapter_name": "第2588章 苏醒!",
"sub_count": 2841630,
"novel_name": "武逆",
"last_update_time": 1393605899300
},
{
"classes": "玄幻",
"gid": 3701669,
"author": "苍笑天",
"nid": 8583556,
"last_sort": 3427,
"last_chapter_name": "第两千两百二十五章 孔雀王!",
"sub_count": 606473,
"novel_name": "武破九霄",
"last_update_time": 1391279170831
},
{
"classes": "玄幻",
"gid": 10645516,
"author": "辰东",
"nid": 12649548,
"last_sort": 478,
"last_chapter_name": "第四百三十二章 扛媳妇回村",
"sub_count": 1422482,
"novel_name": "完美世界",
"last_update_time": 1393681655610
}
]
}';
function mult_unique($array)
{
$return = array();
foreach($array as $key=>$v)
{
if(!in_array($v, $return))
{
$return[$key]=$v;
}
}
return $return;
}
$json = get_object_vars(json_decode($json));
$data = $json['rec_items'];
$data = array_merge_recursive($data, $json['cate_book_items']);
echo '<pre>';
print_r($data);
echo '<br>';
print_r(mult_unique($data));
echo '</pre>';
echo json_encode('I'=>'test');
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).
Version System time (s) User time (s) Memory (MiB) 5.4.25 0.013 0.060 18.93 5.4.24 0.013 0.063 18.90 5.4.23 0.003 0.080 18.65 5.4.22 0.010 0.070 18.82 5.4.21 0.010 0.047 19.04 5.4.20 0.007 0.067 18.93 5.4.19 0.010 0.073 18.95 5.4.18 0.020 0.043 18.94 5.4.17 0.017 0.050 18.95 5.4.16 0.007 0.050 18.93 5.4.15 0.003 0.060 18.98 5.4.14 0.007 0.050 16.42 5.4.13 0.010 0.043 16.41 5.4.12 0.020 0.053 16.30 5.4.11 0.020 0.057 16.53 5.4.10 0.013 0.043 16.47 5.4.9 0.010 0.047 16.50 5.4.8 0.010 0.043 16.55 5.4.7 0.000 0.053 16.45 5.4.6 0.007 0.050 16.54 5.4.5 0.013 0.070 16.46 5.4.4 0.017 0.040 16.61 5.4.3 0.010 0.060 16.45 5.4.2 0.017 0.047 16.48 5.4.1 0.010 0.047 16.30 5.4.0 0.007 0.057 15.75 5.3.28 0.013 0.043 14.64 5.3.27 0.020 0.060 14.70 5.3.26 0.013 0.050 14.68 5.3.25 0.007 0.050 14.68 5.3.24 0.003 0.057 14.76 5.3.23 0.010 0.070 14.70 5.3.22 0.013 0.047 14.73 5.3.21 0.007 0.050 14.66 5.3.20 0.007 0.050 14.66 5.3.19 0.003 0.057 14.64 5.3.18 0.003 0.053 14.47 5.3.17 0.007 0.050 14.79 5.3.16 0.007 0.050 14.54 5.3.15 0.013 0.047 14.57 5.3.14 0.010 0.050 14.46 5.3.13 0.013 0.047 14.73 5.3.12 0.003 0.060 14.78 5.3.11 0.010 0.053 14.57 5.3.10 0.007 0.053 14.13 5.3.9 0.013 0.060 14.11 5.3.8 0.003 0.060 14.04 5.3.7 0.010 0.053 14.25 5.3.6 0.023 0.033 14.16 5.3.5 0.007 0.047 13.94 5.3.4 0.000 0.070 14.02 5.3.3 0.007 0.050 13.83 5.3.2 0.007 0.057 13.71 5.3.1 0.007 0.053 13.74 5.3.0 0.013 0.050 13.63
preferences:dark mode live preview
139.98 ms | 1394 KiB | 7 Q