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); 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.30
8.3.50.0090.00721.14
8.3.40.0120.00618.54
8.3.30.0080.00818.76
8.3.20.0040.00420.30
8.3.10.0000.00822.11
8.3.00.0040.00422.43
8.2.180.0050.00916.50
8.2.170.0090.00622.96
8.2.160.0120.00318.97
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0080.00019.66
8.2.110.0040.00422.29
8.2.100.0060.00619.03
8.2.90.0000.00719.16
8.2.80.0000.00819.37
8.2.70.0030.00617.50
8.2.60.0000.00817.93
8.2.50.0040.00418.07
8.2.40.0000.00818.16
8.2.30.0000.00818.07
8.2.20.0070.00317.79
8.2.10.0000.00817.67
8.2.00.0030.00517.79
8.1.280.0170.00325.92
8.1.270.0050.00318.63
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0060.00323.83
8.1.230.0040.00719.20
8.1.220.0050.00317.76
8.1.210.0080.00018.77
8.1.200.0000.00817.22
8.1.190.0060.00317.41
8.1.180.0000.00818.66
8.1.170.0060.00318.51
8.1.160.0070.00022.06
8.1.150.0000.00718.51
8.1.140.0050.00217.23
8.1.130.0030.00317.73
8.1.120.0040.00417.43
8.1.110.0080.00017.37
8.1.100.0000.00817.31
8.1.90.0030.00417.32
8.1.80.0040.00317.45
8.1.70.0000.00717.44
8.1.60.0060.00317.54
8.1.50.0040.00417.53
8.1.40.0020.00517.48
8.1.30.0030.00517.65
8.1.20.0000.00817.67
8.1.10.0030.00517.60
8.1.00.0000.00717.57
8.0.300.0040.00418.77
8.0.290.0070.00017.18
8.0.280.0050.00318.29
8.0.270.0000.00717.24
8.0.260.0070.00016.77
8.0.250.0020.00516.76
8.0.240.0040.00416.85
8.0.230.0030.00316.83
8.0.220.0070.00016.87
8.0.210.0000.00716.69
8.0.200.0000.00716.93
8.0.190.0070.00416.71
8.0.180.0050.00216.73
8.0.170.0000.00716.84
8.0.160.0080.00016.75
8.0.150.0030.00616.69
8.0.140.0020.00516.67
8.0.130.0050.00013.29
8.0.120.0000.00716.75
8.0.110.0070.00016.71
8.0.100.0000.00716.72
8.0.90.0020.00516.72
8.0.80.0070.01016.72
8.0.70.0040.00416.91
8.0.60.0040.00416.68
8.0.50.0000.00816.63
8.0.30.0110.01117.21
8.0.20.0080.01017.40
8.0.10.0040.00416.98
8.0.00.0110.01016.75
7.4.330.0030.00315.00
7.4.320.0000.00616.57
7.4.300.0030.00316.35
7.4.290.0040.00716.57
7.4.280.0020.00516.63
7.4.270.0030.00316.52
7.4.260.0080.00016.61
7.4.250.0050.00216.51
7.4.240.0020.00616.50
7.4.230.0060.00016.63
7.4.220.0100.00716.66
7.4.210.0050.00916.60
7.4.200.0030.00316.60
7.4.190.0000.00716.77
7.4.160.0070.01016.62
7.4.150.0090.00917.40
7.4.140.0130.00717.86
7.4.130.0110.00716.47
7.4.120.0090.00916.44
7.4.110.0060.01416.22
7.4.100.0160.00616.53
7.4.90.0210.00416.67
7.4.80.0090.00919.39
7.4.70.0110.00716.52
7.4.60.0070.01016.56
7.4.50.0030.00616.45
7.4.40.0090.00622.77
7.4.30.0060.01016.54
7.4.00.0090.00615.18
7.3.330.0000.00613.02
7.3.320.0060.00013.19
7.3.310.0000.00716.31
7.3.300.0000.00716.28
7.3.290.0050.00916.26
7.3.280.0110.00516.27
7.3.270.0180.00017.40
7.3.260.0180.00416.60
7.3.250.0130.00916.37
7.3.240.0170.00616.27
7.3.230.0100.00716.39
7.3.210.0130.01016.36
7.3.200.0100.01319.39
7.3.190.0110.01216.36
7.3.180.0170.00016.40
7.3.170.0100.00616.43
7.3.160.0120.00316.39
7.3.120.0000.01414.89
7.2.330.0140.00616.40
7.2.320.0150.00516.43
7.2.310.0100.00716.36
7.2.300.0130.00416.67
7.2.290.0130.00316.69
7.2.60.0100.00316.78
7.2.00.0000.01119.35
7.1.200.0100.00715.48
7.1.70.0040.00416.93
7.1.60.0040.01117.29
7.1.50.0220.01634.90
7.1.00.0000.07322.32
7.0.200.0030.01316.46
7.0.140.0000.07722.01
7.0.60.0070.08019.91
7.0.50.0070.06317.84
7.0.40.0070.08320.04
7.0.30.0230.03720.04
7.0.20.0270.09020.19
7.0.10.0330.09020.12
7.0.00.0170.07320.13
5.6.280.0030.07320.93
5.6.210.0100.04320.75
5.6.200.0030.06018.23
5.6.190.0130.07720.77
5.6.180.4070.04320.57
5.6.170.0230.04320.50
5.6.160.0030.08320.40
5.6.150.0000.04318.17
5.6.140.0000.04718.21
5.6.130.0000.07318.08
5.6.120.0030.09021.05
5.6.110.0070.04321.11
5.6.100.0030.06720.97
5.6.90.0030.05020.98
5.6.80.0070.04320.52
5.6.70.0230.07020.36
5.5.350.0370.07020.35
5.5.340.0100.06318.02
5.5.330.0070.05020.36
5.5.320.0300.07720.32
5.5.310.0130.04320.29
5.5.300.0070.04317.88
5.5.290.0000.07717.91
5.5.280.0030.04320.83
5.5.270.0030.04320.75
5.5.260.0070.08320.89
5.5.250.0070.05020.70
5.5.240.0000.07020.00
5.4.450.0670.06019.63
5.4.440.0700.06019.64
5.4.430.0900.05019.16
5.4.420.0200.06719.50
5.4.410.0900.06019.28
5.4.400.0770.05018.77
5.4.390.1200.07318.73
5.4.380.0330.06018.46
5.4.370.0300.04018.49
5.4.360.0200.04718.62
5.4.350.0200.05318.70
5.4.340.0130.05318.71
5.4.320.0060.03712.45
5.4.310.0050.03812.45
5.4.300.0040.04812.45
5.4.290.0090.03512.45
5.4.280.0120.04012.35
5.4.270.0040.03812.35
5.4.260.0070.04012.35
5.4.250.0100.05319.02
5.4.240.0200.07718.74
5.4.230.0130.07018.84
5.4.220.0100.06318.77
5.4.210.0030.06318.84
5.4.200.0000.06718.99
5.4.190.0170.06719.02
5.4.180.0070.06318.74
5.4.170.0170.05318.87
5.4.160.0030.07718.64
5.4.150.0100.05318.79
5.4.140.0170.05316.41
5.4.130.0070.05016.24
5.4.120.0130.06716.20
5.4.110.0130.05016.49
5.4.100.0070.05016.49
5.4.90.0100.04716.22
5.4.80.0070.05016.51
5.4.70.0070.06716.24
5.4.60.0200.04716.39
5.4.50.0070.05016.43
5.4.40.0070.05016.52
5.4.30.0070.06016.22
5.4.20.0130.05316.39
5.4.10.0070.05316.32
5.4.00.0170.04715.63
5.3.290.0080.04612.80
5.3.280.0100.05014.46
5.3.270.0170.06714.52
5.3.260.0100.05714.71
5.3.250.0030.07314.60
5.3.240.0100.05014.49
5.3.230.0170.04714.75
5.3.220.0070.06014.34
5.3.210.0030.06014.62
5.3.200.0170.04314.27
5.3.190.0070.05014.62
5.3.180.0130.04714.56
5.3.170.0030.07014.57
5.3.160.0030.05714.58
5.3.150.0000.06314.58
5.3.140.0130.04714.41
5.3.130.0130.05014.47
5.3.120.0100.06014.44
5.3.110.0100.05714.64
5.3.100.0030.07314.05
5.3.90.0170.04713.86
5.3.80.0100.06713.79
5.3.70.0070.06314.11
5.3.60.0130.05313.94
5.3.50.0070.05313.80
5.3.40.0070.05313.98
5.3.30.0130.05713.68
5.3.20.0000.05713.85
5.3.10.0170.04713.64
5.3.00.0200.04713.49
5.2.170.0100.04011.05
5.2.160.0070.04011.23
5.2.150.0100.04011.29
5.2.140.0100.05311.15
5.2.130.0070.03711.03
5.2.120.0030.04011.19
5.2.110.0030.05311.12
5.2.100.0070.03711.10
5.2.90.0070.04011.10
5.2.80.0130.05711.09
5.2.70.0100.03711.02
5.2.60.0030.04710.98
5.2.50.0130.03711.02
5.2.40.0070.03710.99
5.2.30.0000.04710.98
5.2.20.0130.04710.95
5.2.10.0030.05010.79
5.2.00.0030.04010.72
5.1.60.0000.0379.96
5.1.50.0100.0409.90
5.1.40.0170.0379.88
5.1.30.0100.05310.48
5.1.20.0000.04010.43
5.1.10.0030.04310.13
5.1.00.0070.0409.92
5.0.50.0100.0208.45
5.0.40.0070.0378.32
5.0.30.0070.0438.24
5.0.20.0070.0278.28
5.0.10.0070.0378.09
5.0.00.0030.0578.20
4.4.90.0070.0277.52
4.4.80.0070.0177.52
4.4.70.0030.0207.52
4.4.60.0070.0207.52
4.4.50.0000.0237.52
4.4.40.0070.0437.52
4.4.30.0030.0207.52
4.4.20.0030.0237.52
4.4.10.0000.0307.52
4.4.00.0030.0337.52
4.3.110.0000.0337.52
4.3.100.0030.0307.52
4.3.90.0070.0277.52
4.3.80.0000.0377.52
4.3.70.0000.0237.52
4.3.60.0070.0277.52
4.3.50.0000.0237.52
4.3.40.0070.0307.52
4.3.30.0070.0207.52
4.3.20.0030.0207.52
4.3.10.0030.0207.52
4.3.00.0030.0237.18

preferences:
45.08 ms | 401 KiB | 5 Q