3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json = '{ "Products": [ { "_id": 1 }, { "_id": 2 } ] }'; $object = json_decode($json, true); foreach($object as $product => $value) print_r($product);

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.60.0100.01018.43
8.3.50.0150.00321.17
8.3.40.0140.00718.39
8.3.30.0150.00018.84
8.3.20.0070.00020.04
8.3.10.0040.00423.56
8.3.00.0030.00519.13
8.2.180.0090.00916.50
8.2.170.0130.00322.96
8.2.160.0080.00620.51
8.2.150.0060.00324.18
8.2.140.0030.00524.66
8.2.130.0040.00426.16
8.2.120.0070.00022.23
8.2.110.0030.00622.16
8.2.100.0080.00417.63
8.2.90.0050.00319.09
8.2.80.0000.00817.97
8.2.70.0080.00017.50
8.2.60.0060.00618.00
8.2.50.0000.00818.07
8.2.40.0080.00019.97
8.2.30.0040.00417.96
8.2.20.0000.00817.66
8.2.10.0000.00718.17
8.2.00.0050.00217.65
8.1.280.0090.01225.92
8.1.270.0030.00622.13
8.1.260.0070.00026.35
8.1.250.0070.00028.09
8.1.240.0050.00523.98
8.1.230.0050.00517.64
8.1.220.0000.00817.79
8.1.210.0000.00818.77
8.1.200.0070.00317.10
8.1.190.0000.00817.13
8.1.180.0060.00318.10
8.1.170.0030.00618.71
8.1.160.0040.00421.92
8.1.150.0040.00418.88
8.1.140.0040.00417.44
8.1.130.0030.00317.82
8.1.120.0030.00317.45
8.1.110.0040.00417.46
8.1.100.0050.00317.54
8.1.90.0060.00317.46
8.1.80.0080.00017.48
8.1.70.0040.00417.40
8.1.60.0000.00817.55
8.1.50.0050.00317.55
8.1.40.0060.00317.49
8.1.30.0000.00817.54
8.1.20.0000.00717.49
8.1.10.0040.00417.44
8.1.00.0030.00617.38
8.0.300.0070.00018.77
8.0.290.0040.00416.63
8.0.280.0000.00718.48
8.0.270.0000.00717.20
8.0.260.0030.00317.20
8.0.250.0030.00317.00
8.0.240.0030.00316.94
8.0.230.0000.00716.93
8.0.220.0030.00316.84
8.0.210.0060.00016.78
8.0.200.0060.00316.96
8.0.190.0080.00016.95
8.0.180.0040.00416.79
8.0.170.0000.00916.79
8.0.160.0070.00016.88
8.0.150.0060.00316.71
8.0.140.0080.00016.71
8.0.130.0000.00613.33
8.0.120.0000.00716.74
8.0.110.0000.00716.72
8.0.100.0040.00416.73
8.0.90.0000.00716.82
8.0.80.0120.00616.83
8.0.70.0040.00416.85
8.0.60.0000.00816.91
8.0.50.0000.00816.87
8.0.30.0090.01216.96
8.0.20.0150.00717.40
8.0.10.0000.00816.92
8.0.00.0100.00816.87
7.4.330.0000.00515.02
7.4.320.0040.00416.59
7.4.300.0000.00616.58
7.4.290.0030.00316.65
7.4.280.0050.00216.43
7.4.270.0030.00316.60
7.4.260.0030.00716.57
7.4.250.0040.00416.45
7.4.240.0040.00316.50
7.4.230.0070.00016.29
7.4.220.0040.01416.65
7.4.210.0030.01116.51
7.4.200.0000.00716.68
7.4.160.0190.00016.40
7.4.150.0120.00617.40
7.4.140.0090.00917.86
7.4.130.0110.00716.56
7.4.120.0090.00816.42
7.4.110.0120.00616.56
7.4.100.0120.00816.49
7.4.90.0040.01416.61
7.4.80.0080.01119.39
7.4.70.0080.01116.45
7.4.60.0060.00916.32
7.4.50.0000.00816.40
7.4.40.0120.00316.63
7.4.30.0090.00816.32
7.4.00.0070.01015.04
7.3.330.0030.00313.00
7.3.320.0000.00513.05
7.3.310.0070.00016.18
7.3.300.0000.00716.18
7.3.290.0070.01016.28
7.3.280.0080.01116.26
7.3.270.0030.01417.40
7.3.260.0070.01716.25
7.3.250.0130.00816.34
7.3.240.0140.00416.23
7.3.230.0100.00716.48
7.3.210.0110.00716.16
7.3.200.0090.01219.39
7.3.190.0100.00716.46
7.3.180.0100.00616.23
7.3.170.0100.01016.28
7.3.160.0090.01216.26
7.3.10.0060.00616.67
7.3.00.0040.01116.85
7.2.330.0120.00916.67
7.2.320.0030.01716.71
7.2.310.0120.00616.64
7.2.300.0070.01016.60
7.2.290.0140.00416.68
7.2.130.0090.00617.03
7.2.120.0100.00316.71
7.2.110.0080.00317.05
7.2.100.0060.00617.09
7.2.90.0070.01116.86
7.2.80.0120.00416.72
7.2.70.0070.00716.99
7.2.60.0040.01116.85
7.2.50.0040.00716.78
7.2.40.0000.01516.98
7.2.30.0000.01017.04
7.2.20.0090.00616.75
7.2.10.0070.01016.81
7.2.00.0100.00518.14
7.1.250.0100.00715.78
7.1.200.0000.01415.70
7.1.100.0000.01217.90
7.1.70.0040.00417.19
7.1.60.0080.01519.11
7.1.50.0140.01016.96
7.1.00.0070.07022.29
7.0.200.0000.00816.51
7.0.140.0100.06722.05
7.0.60.0130.04320.00
7.0.50.0070.08017.91
7.0.40.0070.04020.39
7.0.30.0430.08020.12
7.0.20.0170.05320.31
7.0.10.0130.08020.17
7.0.00.0070.08320.12
5.6.280.0030.07720.77
5.6.210.0070.08320.45
5.6.200.0100.07018.19
5.6.190.0070.05020.39
5.6.180.0230.07320.45
5.6.170.0370.07720.44
5.6.160.0070.08320.50
5.6.150.0100.06718.21
5.6.140.0130.04318.17
5.6.130.0030.04318.14
5.6.120.0170.07321.14
5.6.110.0030.07721.00
5.6.100.0100.03321.10
5.6.90.0100.08320.99
5.6.80.0070.07720.54
5.6.70.0070.07320.43
5.5.350.0130.04020.40
5.5.340.0100.04317.92
5.5.330.0030.09020.15
5.5.320.0200.06720.43
5.5.310.0300.09020.28
5.5.300.0070.04717.91
5.5.290.0070.06018.01
5.5.280.0170.06320.83
5.5.270.0100.07720.83
5.5.260.0130.08320.95
5.5.250.0100.08020.50
5.5.240.0270.06320.17
5.4.450.0230.07719.32
5.4.440.0130.06719.32
5.4.430.0300.06319.44
5.4.420.0870.00019.46
5.4.410.0630.00019.21
5.4.400.0630.00019.22
5.4.390.0630.00019.09
5.4.380.0630.00019.09
5.4.370.0630.00018.97
5.4.360.0600.00019.13
5.4.350.0700.00018.92
5.4.340.0060.03811.97
5.4.320.0050.04012.46
5.4.310.0060.05612.45
5.4.300.0070.03612.46
5.4.290.0070.04912.45
5.4.280.0140.05312.35
5.4.270.0100.04212.35
5.4.260.0110.04212.35
5.4.250.0050.03912.35
5.4.240.0070.03512.35
5.4.230.0070.04512.34
5.4.220.0040.03912.34
5.4.210.0060.04112.34
5.4.200.0070.03812.34
5.4.190.0060.03712.34
5.4.180.0050.03712.34
5.4.170.0050.03712.35
5.4.160.0080.03412.34
5.4.150.0060.03512.34
5.4.140.0070.03512.03
5.4.130.0060.03512.02
5.4.120.0060.03511.97
5.4.110.0040.03711.97
5.4.100.0040.03811.97
5.4.90.0040.03911.97
5.4.80.0060.03811.97
5.4.70.0030.03911.96
5.4.60.0060.03511.97
5.4.50.0080.03311.96
5.4.40.0080.03311.95
5.4.30.0040.03811.95
5.4.20.0070.03311.95
5.4.10.0060.03511.95
5.4.00.0030.03811.44
5.3.290.0070.03812.80
5.3.280.0070.03912.71
5.3.270.0080.04112.72
5.3.260.0070.03912.72
5.3.250.0060.03712.71
5.3.240.0110.04212.72
5.3.230.0070.05112.71
5.3.220.0070.03612.68
5.3.210.0040.04212.68
5.3.200.0160.06812.68
5.3.190.0140.04612.68
5.3.180.0120.05112.68
5.3.170.0120.04712.67
5.3.160.0060.03812.67
5.3.150.0070.03812.67
5.3.140.0070.03512.66
5.3.130.0070.03812.66
5.3.120.0050.04112.66
5.3.110.0050.04012.66
5.3.100.0050.04012.11
5.3.90.0100.03212.09
5.3.80.0070.03612.08
5.3.70.0060.03612.08
5.3.60.0060.03612.06
5.3.50.0070.04412.00
5.3.40.0070.03712.00
5.3.30.0070.03711.95
5.3.20.0080.04711.72
5.3.10.0030.03911.69
5.3.00.0070.03911.68
5.2.170.0080.0299.18
5.2.160.0070.0419.18
5.2.150.0090.0359.18
5.2.140.0070.0319.17
5.2.130.0050.0319.13
5.2.120.0080.0279.14
5.2.110.0100.0269.14
5.2.100.0050.0289.13
5.2.90.0040.0309.14
5.2.80.0060.0319.14
5.2.70.0090.0269.13
5.2.60.0040.0349.09
5.2.50.0070.0329.05
5.2.40.0060.0309.04
5.2.30.0090.0489.01
5.2.20.0040.0309.00
5.2.10.0070.0308.92
5.2.00.0040.0308.77
5.1.60.0070.0258.07
5.1.50.0040.0258.06
5.1.40.0020.0298.04
5.1.30.0040.0308.39
5.1.20.0020.0328.41
5.1.10.0050.0268.14
5.1.00.0060.0308.14
5.0.50.0020.0256.62
5.0.40.0050.0176.48
5.0.30.0020.0366.29
5.0.20.0020.0226.26
5.0.10.0070.0346.23
5.0.00.0030.0426.23
4.4.90.0040.0234.78
4.4.80.0030.0234.75
4.4.70.0050.0214.76
4.4.60.0030.0194.75
4.4.50.0010.0194.77
4.4.40.0030.0344.71
4.4.30.0040.0154.76
4.4.20.0060.0174.84
4.4.10.0060.0204.85
4.4.00.0050.0274.76
4.3.110.0030.0174.67
4.3.100.0040.0144.67
4.3.90.0050.0134.64
4.3.80.0050.0374.59
4.3.70.0070.0174.63
4.3.60.0030.0214.63
4.3.50.0030.0214.63
4.3.40.0050.0284.54
4.3.30.0020.0163.28
4.3.20.0020.0163.25
4.3.10.0010.0173.22
4.3.00.0030.0206.86

preferences:
36.47 ms | 401 KiB | 5 Q