3v4l.org

run code in 300+ PHP versions simultaneously
<?php $api_response = '{"count":3,"links":[{"id":1001,"name":"Link 1","title":"Link Title","head":"Links","pic":"https://image.com/pic.jpg","views":"10,000+","country":"US"},{"id":1002,"name":"Link 2","title":"Link Title 2","head":"Links","pic":"https://image.com/pic.jpg","views":"10,000+","country":"US"},{"id":1003,"name":"Link 3","title":"Link Title 3","head":"Links","pic":"https://image.com/pic.jpg","views":"10,000+","country":"US"}]}'; $filter = [1001,1003]; $links = json_decode($api_response)->links; $filtered = array_filter($links, function ($item) use ($filter) { return in_array($item->id, $filter); }); print_r($filtered); ?>

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.0070.00718.30
8.3.60.0070.01418.27
8.3.50.0140.00716.49
8.3.40.0080.00818.71
8.3.30.0140.00018.68
8.3.20.0040.00420.35
8.3.10.0040.00423.64
8.3.00.0040.00422.57
8.2.190.0090.00916.58
8.2.180.0070.00716.75
8.2.170.0090.00622.96
8.2.160.0140.00322.13
8.2.150.0070.00024.18
8.2.140.0040.00424.66
8.2.130.0000.00726.16
8.2.120.0000.00819.42
8.2.110.0050.00522.20
8.2.100.0080.00519.31
8.2.90.0050.00718.40
8.2.80.0070.00418.32
8.2.70.0110.00118.39
8.2.60.0140.00718.40
8.2.50.0120.00318.92
8.2.40.0070.00419.68
8.2.30.0060.00419.03
8.2.20.0090.00118.56
8.2.10.0130.00219.18
8.2.00.0080.00718.48
8.1.280.0100.01025.92
8.1.270.0070.00024.66
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0150.00417.96
8.1.230.0120.00419.66
8.1.220.0050.00518.13
8.1.210.0100.00119.29
8.1.200.0050.00717.94
8.1.190.0070.00417.93
8.1.180.0130.00618.15
8.1.170.0110.00218.64
8.1.160.0070.00718.81
8.1.150.0070.00419.63
8.1.140.0060.00519.38
8.1.130.0120.00319.36
8.1.120.0110.00418.09
8.1.110.0070.00418.57
8.1.100.0060.00518.89
8.1.90.0070.00318.02
8.1.80.0050.00617.93
8.1.70.0090.00019.00
8.1.60.0080.00418.01
8.1.50.0110.00517.96
8.1.40.0060.00318.12
8.1.30.0060.00419.15
8.1.20.0090.00318.20
8.1.10.0080.00317.96
8.1.00.0070.00418.04
8.0.300.0090.00319.74
8.0.290.0100.00217.04
8.0.280.0060.00518.17
8.0.270.0100.00117.15
8.0.260.0050.00520.08
8.0.250.0070.00417.35
8.0.240.0080.00217.39
8.0.230.0060.00418.55
8.0.220.0080.00418.16
8.0.210.0090.00218.18
8.0.200.0110.00017.38
8.0.190.0070.00318.45
8.0.180.0080.00217.43
8.0.170.0060.00617.38
8.0.160.0070.00417.42
8.0.150.0120.00017.30
8.0.140.0080.00618.14
8.0.130.0070.00315.77
8.0.120.0060.00517.30
8.0.110.0030.00818.19
8.0.100.0090.00217.13
8.0.90.0090.00117.30
8.0.80.0070.01117.02
8.0.70.0100.00117.28
8.0.60.0070.00317.26
8.0.50.0020.00817.18
8.0.30.0090.00817.35
8.0.20.0080.00917.28
8.0.10.0080.00617.40
8.0.00.0080.01017.82
7.4.330.0040.00416.52
7.4.320.0070.00416.88
7.4.300.0020.00516.95
7.4.290.0040.00417.82
7.4.280.0030.00716.90
7.4.270.0040.00318.04
7.4.260.0030.00617.03
7.4.250.0030.00617.04
7.4.240.0060.00316.93
7.4.230.0090.00217.00
7.4.220.0050.00317.82
7.4.210.0100.00416.81
7.4.200.0060.00218.01
7.4.190.0120.00017.54
7.4.180.0070.00417.46
7.4.160.0090.00817.02
7.4.150.0090.00517.93
7.4.140.0060.00717.90
7.4.130.0070.00816.91
7.4.120.0080.00816.65
7.4.110.0090.00916.74
7.4.100.0100.00716.71
7.4.90.0080.01016.71
7.4.80.0090.01017.40
7.4.70.0110.00916.59
7.4.60.0110.00816.58
7.4.50.0120.00516.47
7.4.40.0120.00716.58
7.4.30.0120.00816.59
7.4.20.0100.01016.59
7.4.10.0120.00716.53
7.4.00.0070.00916.38
7.3.330.0030.00615.33
7.3.320.0080.00315.12
7.3.310.0080.00416.84
7.3.300.0050.00616.91
7.3.290.0050.00616.89
7.3.280.0110.00616.60
7.3.270.0120.00616.63
7.3.260.0100.00816.51
7.3.250.0070.00917.04
7.3.240.0120.00816.51
7.3.230.0140.00816.67
7.3.220.0120.00516.61
7.3.210.0080.00916.57
7.3.200.0120.01016.53
7.3.190.0100.01316.41
7.3.180.0140.00616.49
7.3.170.0130.00816.45
7.3.160.0150.00616.71
7.3.150.0110.01016.40
7.3.140.0110.00916.42
7.3.130.0080.01216.48
7.3.120.0110.00916.51
7.3.110.0100.00716.22
7.3.100.0090.00916.23
7.3.90.0110.00816.30
7.3.80.0090.00816.18
7.3.70.0080.00916.19
7.3.60.0110.00916.23
7.3.50.0100.00816.10
7.3.40.0090.01016.02
7.3.30.0100.00815.87
7.3.20.0790.00716.15
7.3.10.0720.00716.03
7.3.00.0950.01016.11
7.2.340.0130.00716.84
7.2.330.0150.00516.75
7.2.320.0120.01016.78
7.2.310.0100.01016.62
7.2.300.0120.01016.69
7.2.290.0120.00816.68
7.2.280.0120.01016.64
7.2.270.0110.00916.56
7.2.260.0120.00916.65
7.2.250.0110.00916.58
7.2.240.0120.00816.36
7.2.230.0130.01016.45
7.2.220.0120.01016.39
7.2.210.0110.00716.45
7.2.200.0130.00816.49
7.2.190.0130.00716.43
7.2.180.0080.01116.23
7.2.170.0110.01116.31
7.2.160.0150.00716.05
7.2.150.1100.01016.62
7.2.140.0680.00916.42
7.2.130.1000.00616.38
7.2.120.0910.00916.31
7.2.110.0900.00816.34
7.2.100.0440.00916.35
7.2.90.0510.00816.33
7.2.80.0600.00816.36
7.2.70.0390.00916.37
7.2.60.0300.01016.35
7.2.50.0520.01016.35
7.2.40.0820.01016.32
7.2.30.0830.00816.33
7.2.20.0940.00916.37
7.2.10.0840.01016.45
7.2.00.1030.00516.38
7.1.330.0120.01015.76
7.1.320.0110.01015.70
7.1.310.0220.00815.69
7.1.300.0140.00715.62
7.1.290.0150.00715.72
7.1.280.0110.00815.42
7.1.270.0910.01015.24
7.1.260.0890.00615.21
7.1.250.0850.00815.25
7.1.240.0150.00915.88
7.1.230.0130.01015.94
7.1.220.0120.00915.97
7.1.210.0160.00516.00
7.1.200.0140.01215.94
7.1.190.0100.01115.94
7.1.180.0160.00815.84
7.1.170.0180.00616.08
7.1.160.0220.00915.81
7.1.150.0150.00615.97
7.1.140.0140.00915.88
7.1.130.0170.00615.89
7.1.120.0140.00815.91
7.1.110.0160.00715.98
7.1.100.0170.00815.97
7.1.90.0160.00815.92
7.1.80.0220.01015.92
7.1.70.0250.01015.89
7.1.60.0180.00815.97
7.1.50.0170.00916.00
7.1.40.0150.01015.94
7.1.30.0140.01015.89
7.1.20.0140.01215.99
7.1.10.0150.01015.98
7.1.00.0150.01215.98

preferences:
31.13 ms | 401 KiB | 5 Q