3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = '[]'; for ($i = 0; $i < 50000; $i++) $string = '[' . $string . ']'; $s = microtime(true); json_decode($string); $s = microtime(true) - $s; var_dump(json_last_error(), JSON_ERROR_DEPTH, round($s, 5));

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)
7.4.00.0100.21715.51
7.3.120.0030.23515.48
7.3.110.0000.23815.28
7.3.100.0100.14115.02
7.3.90.0000.17215.00
7.3.80.0070.15015.06
7.3.70.0000.15615.16
7.3.60.0000.17815.23
7.3.50.0000.15115.15
7.3.40.0030.19215.07
7.3.30.0100.14015.21
7.3.20.0030.21216.92
7.3.10.0080.14416.37
7.3.00.0070.14316.44
7.2.250.0070.24115.69
7.2.240.0030.18115.59
7.2.230.0070.15915.55
7.2.220.0030.20015.50
7.2.210.0030.15015.38
7.2.200.0100.14515.47
7.2.190.0030.16115.32
7.2.180.0070.15415.38
7.2.170.0030.15415.55
7.2.130.0070.15317.00
7.2.120.0070.16916.27
7.2.110.0070.14716.50
7.2.100.0100.14816.98
7.2.90.0030.15717.00
7.2.80.0030.15517.05
7.2.70.0100.14717.01
7.2.60.0070.15416.70
7.2.50.0030.15616.68
7.2.40.0100.15416.88
7.2.30.0070.15817.07
7.2.20.0100.15016.84
7.2.10.0030.15016.93
7.2.00.0030.15018.12
7.1.330.0070.16715.91
7.1.320.0030.16816.07
7.1.310.0000.14815.51
7.1.300.0070.16215.98
7.1.290.0030.14015.69
7.1.280.0030.22015.95
7.1.270.0030.18615.91
7.1.260.0070.14715.86
7.1.250.0030.16915.72
7.1.70.0070.14617.27
7.1.60.0070.18019.82
7.1.50.0030.22017.33
7.1.00.0030.20322.49
7.0.200.0000.13916.95
7.0.140.0030.20022.01
7.0.80.0000.20020.37
7.0.70.0030.14720.31
7.0.60.0030.18720.40
7.0.50.0070.17320.73
7.0.40.0030.20720.16
7.0.30.0070.23020.20
7.0.20.0130.17320.16
7.0.10.0100.17320.23
7.0.00.0170.19320.14
5.6.230.0030.29021.04
5.6.220.0000.28021.13
5.6.210.0030.31721.13
5.6.200.0070.26021.53
5.6.190.0070.27321.57
5.6.180.0100.24721.57
5.6.170.0070.36721.64
5.6.160.0000.29721.65
5.6.150.0070.36021.67
5.6.140.0200.34721.49
5.6.130.0100.33321.55
5.6.120.0100.32721.54
5.6.110.0130.29721.54
5.6.100.0070.35321.70
5.6.90.0200.26021.63
5.6.80.0030.28020.98
5.6.70.0100.31721.02
5.6.60.0130.33020.99
5.6.50.0000.28721.04
5.6.40.0000.30321.00
5.6.30.0070.34320.96
5.6.20.0130.36720.91
5.6.10.0200.34320.99
5.6.00.0000.37320.89
5.5.370.0030.26020.89
5.5.360.0100.27020.90
5.5.350.0100.33021.02
5.5.340.0030.28021.34
5.5.330.0030.28321.47
5.5.320.0100.27021.42
5.5.310.0070.33721.29
5.5.300.0100.34321.46
5.5.290.0130.36021.36
5.5.280.0030.35021.18
5.5.270.0030.34021.38
5.5.260.0070.28021.27
5.5.250.0230.31021.26
5.5.240.0070.27320.84
5.5.230.0030.34020.78
5.5.220.0030.26020.84
5.5.210.0000.33720.79
5.5.200.0100.30720.68
5.5.190.0100.34720.69
5.5.180.0100.35320.81
5.5.160.0030.34020.68
5.5.150.0070.32720.66
5.5.140.0100.37020.83
5.5.130.0170.33320.77
5.5.120.0100.35020.78
5.5.110.0070.31020.71
5.5.100.0100.33020.64
5.5.90.0000.29020.62
5.5.80.0070.22720.60
5.5.70.0170.33020.59
5.5.60.0200.35320.59
5.5.50.0070.35320.62
5.5.40.0130.33320.69
5.5.30.0030.32020.67
5.5.20.0100.37320.61
5.5.10.0070.34720.51
5.5.00.0070.25320.60
5.4.450.0130.35319.62
5.4.440.0100.31019.70
5.4.430.0100.33719.76
5.4.420.0030.30319.62
5.4.410.0170.29719.43
5.4.400.0070.32019.63
5.4.390.0000.33719.42
5.4.380.0300.23719.29
5.4.370.0030.28719.57
5.4.360.0130.29019.38
5.4.350.0100.33319.42
5.4.340.0070.31719.52
5.4.320.0530.30019.47
5.4.310.0130.33319.43
5.4.300.0070.32319.56
5.4.290.0170.32719.43
5.4.280.0100.29019.59
5.4.270.0100.34719.26
5.4.260.0100.35019.42
5.4.250.0070.34019.41
5.4.240.0030.34019.43
5.4.230.0100.28319.57
5.4.220.0000.33719.41
5.4.210.0070.36019.80
5.4.200.0070.32719.50
5.4.190.0070.31319.29
5.4.180.0100.33319.41
5.4.170.0070.33319.61
5.4.160.0000.33019.50
5.4.150.0030.33719.43
5.4.140.0130.34016.60
5.4.130.0030.28716.86
5.4.120.0530.30016.80
5.4.110.0170.32716.77
5.4.100.0070.29716.86
5.4.90.0030.30316.78
5.4.80.0070.34016.71
5.4.70.0030.29016.87
5.4.60.0030.28716.73
5.4.50.0000.35716.66
5.4.40.0100.33716.75
5.4.30.0070.34316.80
5.4.20.0030.32716.79
5.4.10.0170.34016.78
5.4.00.0100.35016.29
5.3.290.0070.31016.23
5.3.280.0100.31716.23
5.3.270.0130.32716.23
5.3.260.0130.32016.23
5.3.250.0070.31716.23
5.3.240.0000.32716.23
5.3.230.0170.27015.19
5.3.220.0130.32315.29
5.3.210.0070.32015.24
5.3.200.0000.31015.15
5.3.190.0100.30315.16
5.3.180.0170.31015.28
5.3.170.0070.34315.14
5.3.160.0030.27715.29
5.3.150.0100.31315.15
5.3.140.0070.29015.16
5.3.130.0070.29015.16
5.3.120.0070.30715.16
5.3.110.0030.33315.13
5.3.100.1100.31314.47
5.3.90.0870.33314.41
5.3.80.0930.35014.45
5.3.70.1130.34014.35
5.3.60.0970.32314.46
5.3.50.1030.26714.37
5.3.40.0830.29714.47
5.3.30.1000.32314.41
5.3.20.0930.32014.07
5.3.10.0970.34714.18
5.3.00.0970.26714.14
5.2.170.0870.33711.64
5.2.160.1000.35011.64
5.2.150.0730.26711.64
5.2.140.1070.24311.64
5.2.130.0970.26711.64
5.2.120.0700.28011.64
5.2.110.0930.33011.64
5.2.100.0670.32311.64
5.2.90.1130.22311.64
5.2.80.0970.23711.64
5.2.70.0900.29311.64
5.2.60.0930.26311.64
5.2.50.0930.26011.64
5.2.40.0870.27311.64
5.2.30.0700.30711.64
5.2.20.0770.28011.64
5.2.10.0870.23711.64
5.2.00.0000.25311.64
5.1.60.0400.22011.64
5.1.50.0000.28311.64
5.1.40.0270.28011.64
5.1.30.0330.24711.64
5.1.20.0200.28011.64
5.1.10.0330.30011.64
5.1.00.0300.26311.64
5.0.50.0270.26711.64
5.0.40.0100.30311.64
5.0.30.0430.28711.64
5.0.20.0300.29311.64
5.0.10.0400.35711.64
5.0.00.0170.33711.64
4.4.90.0270.24311.64
4.4.80.0330.23311.64
4.4.70.0170.28311.64
4.4.60.0270.29011.64
4.4.50.0200.25311.64
4.4.40.0130.24711.64
4.4.30.0330.19011.64
4.4.20.0130.32311.64
4.4.10.0200.30311.64
4.4.00.0330.33011.64
4.3.110.0230.34011.64
4.3.100.0100.33011.64
4.3.90.0270.32011.64
4.3.80.0230.33711.64
4.3.70.0270.30711.64
4.3.60.0230.29011.64
4.3.50.0030.28011.64
4.3.40.0230.31311.64
4.3.30.0170.26711.64
4.3.20.0270.27311.64
4.3.10.0300.31711.64
4.3.00.0300.29011.64

preferences:
39.77 ms | 400 KiB | 5 Q