3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json1 = '{"data": [{"category": "Games","id": "45345"}, {"category": "Music","id": "345345345"}, {"category": "Food","id": "1"}, {"category": "Pets","id": "13245345"}],"paging": {"next": "https://graph.facebook.com/1161990140/likes?limit=2&offset=2&__after_id=118243704898877"}}'; $json2 = '{"data": {"something": "blah","posts": [{"id": "34241","title": "orange"}],"items": [{"id": "1","name": "orange"},{"id": "2","name": "dog"},{"id": "3","name": "cat"},{"id": "4","name": "apple"}]}}'; $array1 = json_decode($json1, true); $array2 = json_decode($json2, true); $ids = array_map(function($value) { return $value['id']; }, $array2['data']['items']); $new = array_filter($array1['data'], function($var) use ($ids) { return !in_array($var['id'], $ids); }); var_dump($new);

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)
8.3.70.0130.00316.38
8.3.60.0210.00016.63
8.3.50.0140.00718.18
8.3.40.0070.00718.85
8.3.30.0080.00618.67
8.3.20.0050.00318.64
8.3.10.0060.00320.59
8.3.00.0000.00819.38
8.2.190.0070.00716.88
8.2.180.0090.00616.63
8.2.170.0120.00622.96
8.2.160.0000.01320.60
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0060.00326.16
8.2.120.0090.00018.89
8.2.110.0030.00620.57
8.2.100.0000.01118.22
8.2.90.0030.00619.21
8.2.80.0040.00417.97
8.2.70.0040.00417.75
8.2.60.0080.00018.04
8.2.50.0030.00618.07
8.2.40.0070.00018.22
8.2.30.0040.00417.99
8.2.20.0030.00617.60
8.2.10.0000.00817.64
8.2.00.0040.00417.71
8.1.280.0070.00725.92
8.1.270.0050.00323.99
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0040.00422.14
8.1.230.0080.00417.83
8.1.220.0040.00417.74
8.1.210.0030.00518.77
8.1.200.0060.00317.35
8.1.190.0040.00417.35
8.1.180.0080.00018.10
8.1.170.0000.01118.69
8.1.160.0000.00718.90
8.1.150.0000.00818.53
8.1.140.0000.00717.46
8.1.130.0070.00017.82
8.1.120.0000.00817.46
8.1.110.0020.00517.46
8.1.100.0040.00417.39
8.1.90.0040.00417.46
8.1.80.0000.00817.52
8.1.70.0000.00717.48
8.1.60.0050.00217.53
8.1.50.0030.00617.48
8.1.40.0080.00017.55
8.1.30.0040.00417.66
8.1.20.0000.00817.58
8.1.10.0040.00417.56
8.1.00.0040.00417.36
8.0.300.0000.00918.77
8.0.290.0040.00416.75
8.0.280.0050.00318.39
8.0.270.0030.00317.14
8.0.260.0040.00416.86
8.0.250.0000.00816.99
8.0.240.0040.00416.88
8.0.230.0070.00016.96
8.0.220.0000.00716.80
8.0.210.0070.00016.88
8.0.200.0000.00816.94
8.0.190.0030.00316.96
8.0.180.0000.00816.83
8.0.170.0080.00016.85
8.0.160.0000.00716.89
8.0.150.0000.00816.68
8.0.140.0040.00416.83
8.0.130.0000.00713.37
8.0.120.0000.00716.74
8.0.110.0000.00716.93
8.0.100.0040.00416.89
8.0.90.0040.00416.80
8.0.80.0150.00316.93
8.0.70.0030.00516.82
8.0.60.0000.00716.71
8.0.50.0050.00316.90
8.0.30.0120.00616.91
8.0.20.0100.00817.03
8.0.10.0040.00417.08
8.0.00.0130.00616.89
7.4.330.0000.00512.93
7.4.320.0090.00016.62
7.4.300.0030.00316.50
7.4.290.0030.00316.61
7.4.280.0050.00316.64
7.4.270.0030.00316.52
7.4.260.0000.00716.57
7.4.250.0040.00416.45
7.4.240.0080.00016.60
7.4.230.0030.00316.41
7.4.220.0060.01316.40
7.4.210.0130.00316.66
7.4.200.0070.00016.68
7.4.190.0000.00716.51
7.4.160.0130.00716.70
7.4.150.0140.01116.54
7.4.140.0100.00716.35
7.4.130.0140.00316.58
7.4.120.0090.00916.53
7.4.110.0060.01216.66
7.4.100.0100.00716.46
7.4.90.0030.01516.59
7.4.80.0060.01316.55
7.4.70.0060.01016.44
7.4.60.0050.01116.60
7.4.50.0000.01016.52
7.4.40.0110.00216.52
7.4.30.0100.01316.45
7.4.00.0040.01214.71
7.3.330.0040.00413.38
7.3.320.0030.00313.33
7.3.310.0040.00416.25
7.3.300.0030.00316.38
7.3.290.0120.00716.37
7.3.280.0050.01516.32
7.3.270.0130.00416.50
7.3.260.0140.00316.43
7.3.250.0080.01316.38
7.3.240.0110.01416.49
7.3.230.0070.01116.52
7.3.210.0070.01016.40
7.3.200.0100.00719.39
7.3.190.0130.01016.40
7.3.180.0100.00616.54
7.3.170.0030.01316.55
7.3.160.0090.00616.34
7.3.120.0100.00714.63
7.3.10.0080.00516.59
7.3.00.0090.00616.54
7.2.330.0030.01516.69
7.2.320.0070.01516.84
7.2.310.0070.01116.51
7.2.300.0120.00616.46
7.2.290.0110.01116.40
7.2.130.0090.00716.66
7.2.120.0070.00916.96
7.2.110.0080.00316.74
7.2.100.0070.00716.94
7.2.90.0080.00916.79
7.2.80.0110.00316.92
7.2.70.0110.00517.03
7.2.60.0060.00916.89
7.2.50.0070.00616.92
7.2.40.0050.00716.83
7.2.30.0050.00916.67
7.2.20.0040.00916.93
7.2.10.0050.00616.71
7.2.00.0010.01317.73
7.1.250.0070.00615.71
7.1.200.0070.00415.55
7.1.100.0040.00817.71
7.1.70.0040.00816.81
7.1.60.0030.02019.31
7.1.50.0000.02016.79
7.1.00.0070.07322.32
7.0.200.0040.00416.85
7.0.140.0100.06722.04
7.0.120.0000.06722.04
7.0.60.0100.08021.71
7.0.50.0070.08017.89
7.0.40.0070.04720.11
7.0.30.0370.08320.19
7.0.20.0400.06320.06
7.0.10.0130.07320.09
7.0.00.0100.08020.25
5.6.280.0030.07721.05
5.6.210.0200.06320.45
5.6.200.0030.04318.16
5.6.190.0030.08020.61
5.6.180.0300.06020.33
5.6.170.0330.08320.45
5.6.160.0100.08320.46
5.6.150.0030.05018.15
5.6.140.0100.03318.17
5.6.130.0100.08318.16
5.6.120.0070.04021.04
5.6.110.0100.05721.10
5.6.100.0030.06020.97
5.6.90.0070.03720.93
5.6.80.0100.07320.40
5.5.350.0130.08020.41
5.5.340.0100.07317.96
5.5.330.0030.07020.31
5.5.320.0530.05320.38
5.5.310.0270.08320.30
5.5.300.0130.05717.98
5.5.290.0170.07018.03
5.5.280.0100.06020.88
5.5.270.0230.06720.85
5.5.260.0030.07720.87
5.5.250.0070.08320.67
5.5.240.0100.07720.08
5.4.450.0100.04719.57
5.4.440.0100.04019.56
5.4.430.0100.07719.56
5.4.420.0000.05319.53
5.4.410.0130.06719.20
5.4.400.0130.07318.84
5.4.390.0030.07019.20
5.4.380.0030.05718.92
5.4.370.0070.05018.85
5.4.360.0070.07319.16
5.4.350.0070.04019.20
5.4.340.0070.08319.12
5.4.320.0000.04319.16
5.4.310.0070.08319.00
5.4.300.0070.07319.14
5.4.290.0030.04318.87
5.4.280.0100.06018.97
5.4.270.0070.05018.85
5.4.260.0100.07318.85
5.4.250.0130.07019.14
5.4.240.0100.07318.86
5.4.230.0130.05719.14
5.4.220.0100.06319.23
5.4.210.0030.04319.23
5.4.200.0070.06319.13
5.4.190.0030.08319.19
5.4.180.0130.05319.19
5.4.170.0070.04318.84
5.4.160.0070.07318.85
5.4.150.0130.03719.14
5.4.140.0000.04316.36
5.4.130.0100.06716.39
5.4.120.0030.07016.50
5.4.110.0070.07316.34
5.4.100.0100.05316.40
5.4.90.0030.05716.45
5.4.80.0100.06716.50
5.4.70.0100.05716.39
5.4.60.0000.04016.28
5.4.50.0100.07316.36
5.4.40.0000.05716.29
5.4.30.0030.04316.36
5.4.20.0070.04716.69
5.4.10.0030.08016.27
5.4.00.0100.06015.86
5.3.290.0130.04314.67
5.3.280.0100.05714.52
5.3.270.0100.04714.69
5.3.260.0130.06014.57
5.3.250.0200.06314.63
5.3.240.0070.07314.67
5.3.230.0070.04014.52
5.3.220.0170.06014.59
5.3.210.0030.06714.60
5.3.200.0100.07314.61
5.3.190.0070.05314.59
5.3.180.0030.05714.63
5.3.170.0000.06714.61
5.3.160.0030.05014.60
5.3.150.0000.04714.57
5.3.140.0070.05314.72
5.3.130.0030.06714.63
5.3.120.0070.04314.62
5.3.110.0100.08314.59
5.3.100.0030.06014.09
5.3.90.0030.08314.04
5.3.80.0030.08314.04
5.3.70.0130.04313.99
5.3.60.0130.04014.10
5.3.50.0070.07714.13
5.3.40.0030.06713.97
5.3.30.0070.03714.07
5.3.20.0000.06313.74
5.3.10.0070.07013.66
5.3.00.0030.07713.66
5.2.170.0100.05311.08
5.2.160.0070.04011.07
5.2.150.0170.04711.04
5.2.140.0030.03711.11
5.2.130.0130.03011.09
5.2.120.0030.05710.98
5.2.110.0030.05711.18
5.2.100.0030.06711.07
5.2.90.0100.05311.03
5.2.80.0030.06310.97
5.2.70.0000.06011.25
5.2.60.0030.07010.98
5.2.50.0030.06010.96
5.2.40.0030.04710.96
5.2.30.0030.06310.96
5.2.20.0070.05010.91
5.2.10.0030.05310.76
5.2.00.0100.05310.75
5.1.60.0070.02710.14
5.1.50.0000.03310.01
5.1.40.0000.05010.05
5.1.30.0070.05310.42
5.1.20.0030.03310.21
5.1.10.0000.03010.06
5.1.00.0130.04310.07
5.0.50.0030.0478.45
5.0.40.0070.0408.41
5.0.30.0030.0678.25
5.0.20.0070.0338.25
5.0.10.0000.0508.25
5.0.00.0030.0638.25
4.4.90.0000.0378.25
4.4.80.0170.0178.25
4.4.70.0000.0238.25
4.4.60.0030.0378.25
4.4.50.0030.0308.25
4.4.40.0000.0478.25
4.4.30.0030.0238.25
4.4.20.0000.0408.25
4.4.10.0030.0378.25
4.4.00.0070.0508.25
4.3.110.0070.0238.25
4.3.100.0030.0378.25
4.3.90.0000.0378.25
4.3.80.0030.0478.25
4.3.70.0030.0338.25
4.3.60.0000.0338.25
4.3.50.0000.0378.25
4.3.40.0070.0478.25
4.3.30.0000.0378.25
4.3.20.0030.0338.25
4.3.10.0030.0308.25
4.3.00.0000.0338.25

preferences:
30.97 ms | 401 KiB | 5 Q