3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = json_decode('{"3":{"friend":45,"all":100},"2":{"friend":30,"all":50},"1":{"friend":25,"all":25}}'); $b = (array) $a; $n = '3'; var_dump($b[3]->friend);

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.0120.00318.43
8.3.50.0130.00521.09
8.3.40.0040.01118.44
8.3.30.0030.01019.02
8.3.20.0070.00020.21
8.3.10.0050.00322.08
8.3.00.0080.00022.43
8.2.180.0090.00616.38
8.2.170.0090.00622.96
8.2.160.0030.01020.56
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0140.00026.16
8.2.120.0080.00019.66
8.2.110.0030.00822.20
8.2.100.0000.01219.64
8.2.90.0000.00819.39
8.2.80.0000.00817.97
8.2.70.0000.00817.50
8.2.60.0060.00317.93
8.2.50.0040.00418.07
8.2.40.0000.00818.14
8.2.30.0000.00918.04
8.2.20.0060.00617.68
8.2.10.0020.00517.64
8.2.00.0000.00817.64
8.1.280.0090.00625.92
8.1.270.0030.00520.40
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0000.00923.96
8.1.230.0100.00018.97
8.1.220.0000.00817.76
8.1.210.0050.00318.77
8.1.200.0030.00617.23
8.1.190.0030.00617.51
8.1.180.0000.00818.36
8.1.170.0050.00318.54
8.1.160.0000.00722.00
8.1.150.0040.00418.41
8.1.140.0040.00417.38
8.1.130.0000.00717.86
8.1.120.0030.00317.36
8.1.110.0000.00717.39
8.1.100.0050.00217.43
8.1.90.0030.00317.40
8.1.80.0000.00717.29
8.1.70.0050.00317.47
8.1.60.0110.00017.46
8.1.50.0030.00517.39
8.1.40.0040.00417.50
8.1.30.0030.00617.57
8.1.20.0040.00417.53
8.1.10.0020.00517.55
8.1.00.0070.00017.57
8.0.300.0000.00718.77
8.0.290.0040.00417.18
8.0.280.0050.00318.29
8.0.270.0000.00717.06
8.0.260.0060.00016.81
8.0.250.0030.00316.79
8.0.240.0000.00916.90
8.0.230.0050.00216.75
8.0.220.0040.00416.78
8.0.210.0070.00016.81
8.0.200.0000.00816.88
8.0.190.0030.00616.77
8.0.180.0040.00416.75
8.0.170.0040.00416.81
8.0.160.0030.00616.78
8.0.150.0030.00616.74
8.0.140.0040.00416.77
8.0.130.0060.00013.21
8.0.120.0040.00416.67
8.0.110.0050.00216.84
8.0.100.0080.00016.76
8.0.90.0040.00416.82
8.0.80.0040.01216.88
8.0.70.0040.00416.71
8.0.60.0050.00316.77
8.0.50.0000.00716.82
8.0.30.0130.00816.92
8.0.20.0090.00817.42
8.0.10.0030.00516.98
8.0.00.0100.00816.76
7.4.330.0020.00215.00
7.4.320.0000.00616.61
7.4.300.0000.00616.41
7.4.290.0000.00716.47
7.4.280.0030.00316.40
7.4.270.0000.00816.49
7.4.260.0000.00716.47
7.4.250.0000.00716.54
7.4.240.0050.00216.59
7.4.230.0000.00616.48
7.4.220.0120.00616.51
7.4.210.0130.00116.60
7.4.200.0000.00716.47
7.4.190.0030.00316.66
7.4.160.0100.01016.56
7.4.150.0090.00917.40
7.4.140.0080.01217.86
7.4.130.0090.00816.44
7.4.120.0080.00916.44
7.4.110.0110.00816.47
7.4.100.0100.01016.56
7.4.90.0070.01416.51
7.4.80.0170.00019.39
7.4.70.0100.01316.57
7.4.60.0070.01016.44
7.4.50.0000.00616.56
7.4.40.0090.00622.77
7.4.30.0110.00516.30
7.4.00.0090.00715.00
7.3.330.0030.00313.20
7.3.320.0030.00313.18
7.3.310.0000.00716.34
7.3.300.0070.00016.07
7.3.290.0100.00316.37
7.3.280.0050.01416.24
7.3.270.0130.01017.40
7.3.260.0090.00916.41
7.3.250.0060.01216.47
7.3.240.0130.01016.44
7.3.230.0130.00916.39
7.3.210.0130.00416.32
7.3.200.0130.00919.39
7.3.190.0090.00916.43
7.3.180.0080.00816.35
7.3.170.0130.00716.38
7.3.160.0090.00616.41
7.3.120.0020.01414.86
7.3.110.0030.01014.91
7.3.100.0090.00614.88
7.3.90.0030.01014.68
7.3.80.0000.01114.84
7.3.70.0000.01114.77
7.3.60.0070.01014.73
7.3.50.0030.00814.89
7.3.40.0070.01014.99
7.3.30.0000.01014.92
7.3.20.0030.00716.81
7.3.10.0080.00316.74
7.3.00.0100.00316.65
7.2.330.0150.00616.68
7.2.320.0120.01216.48
7.2.310.0100.01016.64
7.2.300.0180.00316.41
7.2.290.0070.01016.64
7.2.250.0040.01214.94
7.2.240.0100.00714.86
7.2.230.0030.00914.80
7.2.220.0110.00414.97
7.2.210.0030.01315.13
7.2.200.0030.01015.01
7.2.190.0090.00314.94
7.2.180.0090.00614.96
7.2.170.0060.00314.98
7.2.60.0110.00417.09
7.2.00.0090.00319.45
7.1.330.0040.01215.80
7.1.320.0060.00915.69
7.1.310.0100.00315.36
7.1.300.0070.00415.88
7.1.290.0060.00915.54
7.1.280.0000.01715.75
7.1.270.0070.00715.42
7.1.260.0110.00315.86
7.1.200.0000.00815.57
7.1.100.0000.00918.23
7.1.70.0070.00017.20
7.1.60.0090.01519.82
7.1.50.0030.01016.96
7.1.00.0100.07022.36
7.0.200.0040.00416.59
7.0.140.0030.07022.15
7.0.60.0030.08719.86
7.0.50.0170.07017.89
7.0.40.0030.05020.21
7.0.30.0330.06720.00
7.0.20.0170.05720.20
7.0.10.0100.04720.30
7.0.00.0130.07720.17
5.6.280.0070.07320.99
5.6.210.0070.06720.71
5.6.200.0030.08318.18
5.6.190.0130.08320.35
5.6.180.3130.04320.48
5.6.170.0230.03320.41
5.6.160.0070.04020.45
5.6.150.0070.08018.11
5.6.140.0100.07718.21
5.6.130.0030.07718.22
5.6.120.0130.07721.13
5.6.110.0030.04320.94
5.6.100.0100.05321.04
5.6.90.0130.07321.12
5.6.80.0100.03320.43
5.6.70.0230.07020.37
5.5.350.0400.07020.43
5.5.340.0100.07017.98
5.5.330.0030.04020.40
5.5.320.0270.04320.51
5.5.310.0170.06320.41
5.5.300.0100.08017.96
5.5.290.0130.04717.93
5.5.280.0130.05020.98
5.5.270.0130.06320.88
5.5.260.0200.06320.76
5.5.250.0070.08320.48
5.5.240.0070.08320.15
5.4.450.0030.05019.41
5.4.440.0000.04319.21
5.4.430.0100.04019.40
5.4.420.0070.06019.20
5.4.410.0000.05719.41
5.4.400.0070.06719.10
5.4.390.0030.05019.08
5.4.380.0000.05019.09
5.4.370.0070.06318.92
5.4.360.0000.08018.88
5.4.350.0030.06019.13
5.4.340.0030.06319.24
5.4.320.0000.07018.79
5.4.310.0070.07019.16
5.4.300.0030.05719.08
5.4.290.0030.04018.80
5.4.280.0100.05019.11
5.4.270.0000.07719.06
5.4.260.0070.07319.15
5.4.250.0030.07318.91
5.4.240.0030.04018.87
5.4.230.0000.05318.82
5.4.220.0100.05319.15
5.4.210.0070.04319.09
5.4.200.0000.05719.13
5.4.190.0000.07718.91
5.4.180.0130.07319.23
5.4.170.0000.07719.09
5.4.160.0030.03719.22
5.4.150.0100.07319.08
5.4.140.0070.06316.35
5.4.130.0000.05016.31
5.4.120.0030.07016.25
5.4.110.0000.04316.39
5.4.100.0030.07016.40
5.4.90.0030.07016.39
5.4.80.0070.07316.29
5.4.70.0030.06016.37
5.4.60.0070.07316.16
5.4.50.0030.07316.38
5.4.40.0000.07716.46
5.4.30.0000.04316.38
5.4.20.0030.07016.17
5.4.10.0000.08316.33
5.4.00.0000.07715.88
5.3.290.0100.07314.51
5.3.280.0000.07014.50
5.3.270.0030.08014.57
5.3.260.0070.05314.45
5.3.250.0070.07014.45
5.3.240.0070.05014.59
5.3.230.0000.08014.63
5.3.220.0070.04314.52
5.3.210.0030.05314.52
5.3.200.0030.05014.52
5.3.190.0000.08014.61
5.3.180.0000.07014.52
5.3.170.0000.05014.40
5.3.160.0030.05314.42
5.3.150.0070.05314.40
5.3.140.0030.06014.54
5.3.130.0030.07314.59
5.3.120.0070.05714.50
5.3.110.0000.05714.38
5.3.100.0030.05313.96
5.3.90.0070.07013.88
5.3.80.0070.04013.80
5.3.70.0000.07314.11
5.3.60.0070.04013.95
5.3.50.0030.06013.91
5.3.40.0000.05713.89
5.3.30.0030.07013.71
5.3.20.0030.06713.55
5.3.10.0030.04713.50
5.3.00.0030.07713.55
5.2.170.0030.03712.75
5.2.160.0000.06012.75
5.2.150.0000.05312.75
5.2.140.0070.06012.75
5.2.130.0030.04312.75
5.2.120.0070.05712.75
5.2.110.0030.05312.75
5.2.100.0070.06012.75
5.2.90.0030.05712.75
5.2.80.0030.06712.75
5.2.70.0030.05012.75
5.2.60.0030.03712.75
5.2.50.0000.06312.75
5.2.40.0070.05012.75
5.2.30.0030.05012.75
5.2.20.0030.06012.75
5.2.10.0000.05712.75
5.2.00.0030.04312.75
5.1.60.0000.05712.75
5.1.50.0070.04312.75
5.1.40.0000.05312.75
5.1.30.0000.05712.75
5.1.20.0030.05312.75
5.1.10.0030.05712.75
5.1.00.0000.04312.75
5.0.50.0030.02012.75
5.0.40.0030.04012.75
5.0.30.0000.07012.75
5.0.20.0030.04312.75
5.0.10.0070.02312.75
5.0.00.0000.05312.75
4.4.90.0030.02712.75
4.4.80.0000.03312.75
4.4.70.0030.01712.75
4.4.60.0030.03312.75
4.4.50.0100.02712.75
4.4.40.0030.04312.75
4.4.30.0030.02312.75
4.4.20.0030.02312.75
4.4.10.0000.02712.75
4.4.00.0030.03012.75
4.3.110.0000.03712.75
4.3.100.0030.02712.75
4.3.90.0030.02012.75
4.3.80.0000.05012.75
4.3.70.0000.02312.75
4.3.60.0070.03012.75
4.3.50.0070.02712.75
4.3.40.0030.04312.75
4.3.30.0030.02312.75
4.3.20.0000.02312.75
4.3.10.0000.04012.75
4.3.00.0030.02712.75

preferences:
49.47 ms | 401 KiB | 5 Q