3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Recursion implements JsonSerializable { public function __construct() { $this->cnt = 2048; } public function jsonSerialize() { if ($this->cnt < 1) { return null; } $this->cnt--; return array($this->cnt => $this); } } var_dump(json_encode(new Recursion(), 0, 1000));

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.40.0110.00418.79
8.3.30.0070.00719.13
8.3.20.0040.00420.18
8.3.10.0040.00423.66
8.3.00.0050.00317.75
8.2.170.0070.00722.96
8.2.160.0100.00320.35
8.2.150.0000.00824.18
8.2.140.0080.00024.66
8.2.130.0050.00226.16
8.2.120.0000.00820.73
8.2.110.0060.00320.33
8.2.100.0110.00018.03
8.2.90.0060.00317.97
8.2.80.0040.00418.99
8.2.70.0050.00318.03
8.2.60.0050.00317.93
8.2.50.0070.00518.10
8.2.40.0040.00420.38
8.2.30.0070.00018.15
8.2.20.0050.00217.74
8.2.10.0040.00418.00
8.2.00.0030.00617.79
8.1.270.0110.00423.96
8.1.260.0080.00026.35
8.1.250.0050.00228.09
8.1.240.0100.00322.14
8.1.230.0080.00421.03
8.1.220.0040.00417.78
8.1.210.0000.01218.77
8.1.200.0030.00617.48
8.1.190.0080.00417.00
8.1.180.0030.00518.10
8.1.170.0060.00318.49
8.1.160.0000.00722.16
8.1.150.0040.00418.94
8.1.140.0040.00717.48
8.1.130.0030.00317.68
8.1.120.0030.00317.49
8.1.110.0000.00717.38
8.1.100.0000.00717.48
8.1.90.0040.00717.44
8.1.80.0040.00417.35
8.1.70.0030.00317.38
8.1.60.0000.00817.53
8.1.50.0040.00417.53
8.1.40.0030.00517.61
8.1.30.0040.00417.56
8.1.20.0040.00417.69
8.1.10.0040.00417.43
8.1.00.0000.00817.48
8.0.300.0000.00720.01
8.0.290.0040.00416.63
8.0.280.0000.00718.30
8.0.270.0030.00317.34
8.0.260.0030.00317.23
8.0.250.0070.00016.95
8.0.240.0030.00316.98
8.0.230.0000.00816.95
8.0.220.0000.00816.91
8.0.210.0000.00816.96
8.0.200.0040.00416.84
8.0.190.0000.00717.03
8.0.180.0070.00016.97
8.0.170.0000.00717.00
8.0.160.0040.00416.84
8.0.150.0070.00016.75
8.0.140.0040.00416.75
8.0.130.0030.00513.26
8.0.120.0080.00016.79
8.0.110.0050.00316.91
8.0.100.0040.00417.01
8.0.90.0080.00016.80
8.0.80.0060.00916.88
8.0.70.0000.00716.77
8.0.60.0040.00416.89
8.0.50.0030.00316.84
8.0.30.0090.01417.19
8.0.20.0120.00817.41
8.0.10.0030.00517.04
8.0.00.0110.00616.69
7.4.330.0050.00015.00
7.4.320.0000.00616.59
7.4.300.0060.00016.59
7.4.290.0070.00016.59
7.4.280.0000.00716.61
7.4.270.0000.00716.59
7.4.260.0030.00516.48
7.4.250.0040.00416.54
7.4.240.0020.00616.60
7.4.230.0040.00416.68
7.4.220.0130.01316.63
7.4.210.0040.01516.47
7.4.200.0020.00516.69
7.4.160.0060.01016.50
7.4.150.0170.00317.40
7.4.140.0110.00717.86
7.4.130.0080.01016.51
7.4.120.0140.00316.56
7.4.110.0030.01316.63
7.4.100.0070.01016.43
7.4.90.0070.01116.40
7.4.80.0040.01719.39
7.4.70.0100.01016.64
7.4.60.0130.00716.54
7.4.50.0000.00816.46
7.4.40.0060.01516.43
7.4.30.0090.00716.58
7.4.00.0110.00614.98
7.3.330.0030.00313.29
7.3.320.0050.00013.06
7.3.310.0030.00316.16
7.3.300.0070.00016.21
7.3.290.0100.00616.29
7.3.280.0070.00916.28
7.3.270.0140.00317.40
7.3.260.0060.01016.52
7.3.250.0090.00916.36
7.3.240.0110.01016.57
7.3.230.0060.01016.46
7.3.210.0110.00716.23
7.3.200.0110.01119.39
7.3.190.0170.00316.43
7.3.180.0110.00916.28
7.3.170.0160.00616.52
7.3.160.0130.00316.55
7.2.330.0160.01016.68
7.2.320.0120.00916.58
7.2.310.0110.00916.85
7.2.300.0110.00616.55
7.2.290.0100.00716.51
7.2.80.0100.00316.51
7.2.60.0060.00616.88
7.1.200.0050.00515.43
7.1.70.0000.00717.26
7.1.60.0090.00919.40
7.1.50.0040.00716.95
7.1.00.0070.07022.57
7.0.200.0070.00316.75
7.0.140.0030.07322.18
7.0.90.0100.06019.95
7.0.80.0630.06319.92
7.0.70.0570.04319.86
7.0.60.0530.07319.86
7.0.50.0470.04320.16
7.0.40.0100.04720.05
7.0.30.0000.08020.14
7.0.20.0000.09320.18
7.0.10.0100.06720.12
7.0.00.0100.04720.07
5.6.280.0100.06721.03
5.6.240.0100.08020.52
5.6.230.0030.09320.54
5.6.220.0070.07320.63
5.6.210.0030.06720.57
5.6.200.0130.04721.02
5.6.190.0030.04321.04
5.6.180.0070.08321.12
5.6.170.0130.07720.92
5.6.160.0130.07321.02
5.6.150.0130.07721.14
5.6.140.0000.06021.11
5.6.130.0030.08020.96
5.6.120.0000.05021.11
5.6.110.0030.05321.05
5.6.100.0130.07021.03
5.6.90.0130.06021.00
5.6.80.0170.07020.52
5.6.70.0130.07320.40
5.6.60.0070.05720.38
5.6.50.0170.06720.43
5.6.40.0070.08320.44
5.6.30.0070.03720.39
5.6.20.0130.07720.50
5.6.10.0030.05720.40
5.6.00.0030.04720.43
5.5.380.0030.06020.37
5.5.370.0230.06320.41
5.5.360.0070.08320.56
5.5.350.0100.07720.38
5.5.340.0170.07320.89
5.5.330.0070.08720.89
5.5.320.0000.04320.78
5.5.310.0070.05320.77
5.5.300.0130.07020.78
5.5.290.0130.07720.93
5.5.280.0100.05320.89
5.5.270.0170.06020.86
5.5.260.0030.08320.88
5.5.250.0030.06320.61
5.5.240.0200.05720.00
5.5.230.0130.05320.18
5.5.220.0030.07020.30
5.5.210.0100.05720.22
5.5.200.0070.05020.19
5.5.190.0130.07320.09
5.5.180.0070.05720.18
5.5.160.0130.07720.26
5.5.150.0130.07020.23
5.5.140.0100.07720.08
5.5.130.0170.06320.15
5.5.120.0100.05320.26
5.5.110.0070.08020.12
5.5.100.0070.07020.04
5.5.90.0030.08020.16
5.5.80.0100.07719.98
5.5.70.0000.09020.07
5.5.60.0100.07319.96
5.5.50.0070.08020.16
5.5.40.0100.05020.13
5.5.30.0100.07320.15
5.5.20.0100.06720.05
5.5.10.0200.04320.09
5.5.00.0030.08320.11
5.4.450.0030.08019.54
5.4.440.0030.08319.46
5.4.430.0100.05019.17
5.4.420.0100.07719.27
5.4.410.0070.08019.07
5.4.400.0070.08318.95
5.4.390.0070.08019.21
5.4.380.0200.06319.04
5.4.370.0200.06019.04
5.4.360.0100.05019.04
5.4.350.0070.04318.87
5.4.340.0130.07319.12
5.4.320.0070.07018.95
5.4.310.0130.07019.04
5.4.300.0130.06319.12
5.4.290.0070.05019.04
5.4.280.0100.07019.04
5.4.270.0100.07319.23
5.4.260.0030.07718.94
5.4.250.0030.05719.18
5.4.240.0070.07719.11
5.4.230.0070.04719.02
5.4.220.0100.07719.20
5.4.210.0170.07018.89
5.4.200.0030.07319.02
5.4.190.0100.04019.08
5.4.180.0070.07319.13
5.4.170.0100.07719.20
5.4.160.0070.07018.88
5.4.150.0100.03719.21
5.4.140.0170.06316.46
5.4.130.0070.07016.36
5.4.120.0100.06316.41
5.4.110.0100.04016.35
5.4.100.0070.07016.49
5.4.90.0000.04716.44
5.4.80.0100.03316.50
5.4.70.0100.07016.42
5.4.60.0100.07316.46
5.4.50.0230.05316.48
5.4.40.0130.06316.51
5.4.30.0070.05316.32
5.4.20.0100.05016.44
5.4.10.0030.04016.45
5.4.00.0070.04715.64
5.3.290.0130.06714.62
5.3.280.0100.05314.73
5.3.270.0100.07314.62
5.3.260.0030.08014.70
5.3.250.0070.05314.58
5.3.240.0100.07014.70
5.3.230.0130.04014.54
5.3.220.0070.05014.50
5.3.210.0100.04314.54
5.3.200.0070.07014.66
5.3.190.0070.07314.50
5.3.180.0070.05714.67
5.3.170.0030.05014.70
5.3.160.0070.08014.52
5.3.150.0100.06714.59
5.3.140.0030.08014.64
5.3.130.0000.07714.52
5.3.120.0070.05014.47
5.3.110.0000.04714.66
5.3.100.0000.04014.09
5.3.90.0030.03713.97
5.3.80.0030.03714.14
5.3.70.0070.03014.00
5.3.60.0030.03313.95
5.3.50.0030.03714.07
5.3.40.0030.03713.88
5.3.30.0070.03013.83
5.3.20.0030.03313.58
5.3.10.0070.03013.79
5.3.00.0030.05313.74
5.2.170.0030.03011.14
5.2.160.0000.03311.19
5.2.150.0100.02711.20
5.2.140.0030.03011.28
5.2.130.0030.02710.97
5.2.120.0070.03311.01
5.2.110.0030.03311.13
5.2.100.0030.03711.10
5.2.90.0030.04011.21
5.2.80.0100.03011.10
5.2.70.0000.03711.02
5.2.60.0070.04311.14
5.2.50.0030.03011.15
5.2.40.0030.04711.09
5.2.30.0070.02310.83
5.2.20.0000.03310.89
5.2.10.0070.02310.95
5.2.00.0000.03310.73
5.1.60.0030.02010.11
5.1.50.0000.0339.85
5.1.40.0000.0339.97
5.1.30.0000.02710.24
5.1.20.0070.02710.28
5.1.10.0030.02310.15
5.1.00.0030.02310.18
5.0.50.0030.0178.54
5.0.40.0030.0178.53
5.0.30.0000.0338.32
5.0.20.0030.0208.19
5.0.10.0030.0208.02
5.0.00.0000.0338.15
4.4.90.0000.0177.26
4.4.80.0000.0207.26
4.4.70.0000.0177.26
4.4.60.0000.0177.26
4.4.50.0000.0177.26
4.4.40.0030.0207.26
4.4.30.0000.0177.26
4.4.20.0030.0137.26
4.4.10.0000.0177.26
4.4.00.0030.0237.26
4.3.110.0000.0177.26
4.3.100.0000.0177.26
4.3.90.0100.0037.26
4.3.80.0000.0237.26
4.3.70.0030.0107.26
4.3.60.0000.0177.26
4.3.50.0030.0137.26
4.3.40.0000.0237.26
4.3.30.0030.0177.26
4.3.20.0000.0177.26
4.3.10.0000.0177.26
4.3.00.0000.0137.26

preferences:
43.54 ms | 400 KiB | 5 Q