3v4l.org

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

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.3.10.0070.15216.49
7.3.00.0060.14916.82
7.2.130.0070.14416.86
7.2.120.0100.14816.93
7.2.110.0100.14516.92
7.2.100.0070.14716.94
7.2.90.0030.15016.75
7.2.80.0070.15416.93
7.2.70.0080.15316.95
7.2.60.0110.14217.03
7.2.50.0080.14116.87
7.2.40.0070.15916.95
7.2.30.0030.16917.02
7.2.20.0100.14716.99
7.2.10.0070.14216.92
7.2.00.0040.14916.97
7.1.250.0050.14916.00
7.1.70.0070.14416.79
7.1.60.0100.21719.40
7.1.50.0070.18417.17
7.1.00.0000.15022.41
7.0.200.0030.13616.88
7.0.140.0030.20322.07
7.0.60.0270.22720.38
7.0.50.0030.19318.25
7.0.40.0030.17317.81
7.0.30.0070.16717.76
7.0.20.0100.22717.81
7.0.10.0070.22017.85
7.0.00.0030.21017.73
5.6.280.0100.33021.63
5.6.210.0030.36321.15
5.6.200.0030.29018.61
5.6.190.0030.27318.59
5.6.180.0030.27018.66
5.6.170.0000.29018.68
5.6.160.0070.33718.70
5.6.150.0000.35318.56
5.6.140.0130.26718.73
5.6.130.0100.30018.59
5.6.120.0070.28018.71
5.6.110.0100.35018.61
5.6.100.0100.31018.72
5.6.90.0030.34318.63
5.6.80.0030.35717.95
5.6.70.0030.31018.11
5.6.60.0100.32018.07
5.6.50.0130.31018.07
5.6.40.0130.33717.97
5.6.30.0070.36317.98
5.6.20.0070.30318.02
5.6.10.0070.33318.05
5.6.00.0030.36317.97
5.5.350.3000.24320.95
5.5.340.0070.26318.42
5.5.330.0000.27018.50
5.5.320.0100.26318.47
5.5.310.0070.34318.48
5.5.300.0100.33318.51
5.5.290.0030.35318.43
5.5.280.0030.27718.27
5.5.270.0100.29718.50
5.5.260.0070.33318.47
5.5.250.0130.29718.29
5.5.240.0070.30017.81
5.5.230.0070.35317.86
5.5.220.0000.29317.88
5.5.210.0030.28017.75
5.5.200.0070.35317.63
5.5.190.0000.34717.83
5.5.180.0070.35717.62
5.5.160.0070.34317.82
5.5.150.0100.36317.80
5.5.140.0030.30717.83
5.5.130.0070.35017.77
5.5.120.0070.34717.62
5.5.110.0200.33317.85
5.5.100.0070.34317.68
5.5.90.0030.35017.67
5.5.80.0030.33317.70
5.5.70.0070.29317.64
5.5.60.0030.36317.75
5.5.50.0070.37017.67
5.5.40.0000.31017.68
5.5.30.0130.34317.77
5.5.20.0030.34717.61
5.5.10.0000.29717.71
5.5.00.0070.35317.66
5.4.450.0100.29319.94
5.4.440.0130.35019.64
5.4.430.0070.35719.83
5.4.420.0100.35019.73
5.4.410.0130.33719.61
5.4.400.0070.35319.36
5.4.390.0170.32019.46
5.4.380.0130.29019.52
5.4.370.0030.35019.61
5.4.360.0100.33719.50
5.4.350.0030.31019.55
5.4.340.0070.28719.41
5.4.320.0070.38019.52
5.4.310.0100.36019.43
5.4.300.0030.29719.38
5.4.290.0030.28719.30
5.4.280.0070.34719.30
5.4.270.0070.34319.30
5.4.260.0170.32719.57
5.4.250.0070.33319.54
5.4.240.0030.31719.46
5.4.230.0030.35719.32
5.4.220.0100.34719.47
5.4.210.0070.34319.54
5.4.200.0100.34719.44
5.4.190.0070.34019.34
5.4.180.0100.34719.46
5.4.170.0070.35019.54
5.4.160.0070.31319.36
5.4.150.0130.30719.47
5.4.140.0030.34316.78
5.4.130.0130.35016.79
5.4.120.0070.33316.70
5.4.110.0170.33716.76
5.4.100.0030.34716.74
5.4.90.0070.33716.78
5.4.80.0070.33716.91
5.4.70.0070.34716.68
5.4.60.0100.34016.75
5.4.50.0100.35316.77
5.4.40.0130.32716.87
5.4.30.0170.33016.78
5.4.20.0070.34316.87
5.4.10.0100.34316.70
5.4.00.0170.34316.38
5.3.290.0130.32015.32
5.3.280.0100.33015.21
5.3.270.0170.32015.27
5.3.260.0100.33315.26
5.3.250.0000.28015.24
5.3.240.0030.33315.21
5.3.230.0030.27715.20
5.3.220.0000.34715.02
5.3.210.0030.34015.18
5.3.200.0000.29315.17
5.3.190.0030.27715.32
5.3.180.0030.27315.20
5.3.170.0100.34015.21
5.3.160.0000.34315.09
5.3.150.0070.32315.15
5.3.140.0030.33015.21
5.3.130.0700.28715.29
5.3.120.0070.29315.16
5.3.110.0000.33715.19
5.3.100.0970.34314.38
5.3.90.1100.30314.48
5.3.80.0870.28014.33
5.3.70.1000.24314.50
5.3.60.0830.28014.46
5.3.50.0930.25714.43
5.3.40.1070.24314.45
5.3.30.0870.26014.34
5.3.20.0930.25014.14
5.3.10.0830.26313.94
5.3.00.0870.34014.13
5.2.170.1130.30711.22
5.2.160.0770.28011.44
5.2.150.0800.27011.59
5.2.140.0870.25711.38
5.2.130.0900.25011.34
5.2.120.0700.27011.39
5.2.110.0870.25311.55
5.2.100.0930.35011.37
5.2.90.1130.28311.18
5.2.80.0770.34011.28
5.2.70.1270.31011.29
5.2.60.0930.34011.48
5.2.50.0930.32711.30
5.2.40.0930.34311.32
5.2.30.0930.28311.23
5.2.20.0900.29311.26
5.2.10.1030.24711.27
5.2.00.0000.32011.04
5.1.60.0300.30310.19
5.1.50.0330.30010.08
5.1.40.0300.31710.18
5.1.30.0270.32310.51
5.1.20.0330.25010.54
5.1.10.0230.31010.18
5.1.00.0370.25010.28
5.0.50.0470.2778.76
5.0.40.0370.3108.75
5.0.30.0300.3038.75
5.0.20.0330.2978.75
5.0.10.0170.2938.75
5.0.00.0300.3208.75
4.4.90.0230.3208.75
4.4.80.0270.2808.75
4.4.70.0330.3078.75
4.4.60.0430.2908.75
4.4.50.0200.3078.75
4.4.40.0270.2838.75
4.4.30.0330.2778.75
4.4.20.0300.2878.75
4.4.10.0300.2978.75
4.4.00.0200.3278.75
4.3.110.0300.2808.75
4.3.100.0270.2578.75
4.3.90.0100.3308.75
4.3.80.0170.2808.75
4.3.70.0270.2878.75
4.3.60.0270.2778.75
4.3.50.0200.2608.75
4.3.40.0270.2938.75
4.3.30.0270.3008.75
4.3.20.0370.2538.75
4.3.10.0200.3208.75
4.3.00.0230.2978.75

preferences:
40.2 ms | 401 KiB | 5 Q