3v4l.org

run code in 300+ PHP versions simultaneously
<?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');

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).

VersionSystem time (s)User time (s)Memory (MiB)
5.4.250.0130.06018.93
5.4.240.0130.06318.90
5.4.230.0030.08018.65
5.4.220.0100.07018.82
5.4.210.0100.04719.04
5.4.200.0070.06718.93
5.4.190.0100.07318.95
5.4.180.0200.04318.94
5.4.170.0170.05018.95
5.4.160.0070.05018.93
5.4.150.0030.06018.98
5.4.140.0070.05016.42
5.4.130.0100.04316.41
5.4.120.0200.05316.30
5.4.110.0200.05716.53
5.4.100.0130.04316.47
5.4.90.0100.04716.50
5.4.80.0100.04316.55
5.4.70.0000.05316.45
5.4.60.0070.05016.54
5.4.50.0130.07016.46
5.4.40.0170.04016.61
5.4.30.0100.06016.45
5.4.20.0170.04716.48
5.4.10.0100.04716.30
5.4.00.0070.05715.75
5.3.280.0130.04314.64
5.3.270.0200.06014.70
5.3.260.0130.05014.68
5.3.250.0070.05014.68
5.3.240.0030.05714.76
5.3.230.0100.07014.70
5.3.220.0130.04714.73
5.3.210.0070.05014.66
5.3.200.0070.05014.66
5.3.190.0030.05714.64
5.3.180.0030.05314.47
5.3.170.0070.05014.79
5.3.160.0070.05014.54
5.3.150.0130.04714.57
5.3.140.0100.05014.46
5.3.130.0130.04714.73
5.3.120.0030.06014.78
5.3.110.0100.05314.57
5.3.100.0070.05314.13
5.3.90.0130.06014.11
5.3.80.0030.06014.04
5.3.70.0100.05314.25
5.3.60.0230.03314.16
5.3.50.0070.04713.94
5.3.40.0000.07014.02
5.3.30.0070.05013.83
5.3.20.0070.05713.71
5.3.10.0070.05313.74
5.3.00.0130.05013.63

preferences:
139.98 ms | 1394 KiB | 7 Q