3v4l.org

run code in 300+ PHP versions simultaneously
<?php if (!defined('PHP_INT_MAX')) { $min = -1; do { $last = $min; $min <<= 1; } while($min < 0); define('PHP_INT_MIN', $last); define('PHP_INT_MAX', ~$last); } class Foo { var $id; function Foo() { static $counter = 0; $this->id = $counter++; if ($counter > PHP_INT_MAX) { $counter = PHP_INT_MIN; } } } $i1 = new Foo; var_dump($i1->id); $i2 = new Foo; var_dump($i2->id); $i3 = new Foo; var_dump($i3->id); $i4 = new Foo; var_dump($i4->id);

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.00618.31
8.3.50.0160.00522.05
8.3.40.0070.01018.53
8.3.30.0130.00718.92
8.3.20.0070.00020.29
8.3.10.0040.00420.36
8.3.00.0040.00419.25
8.2.180.0120.00616.63
8.2.170.0140.00722.96
8.2.160.0070.01020.39
8.2.150.0080.00024.18
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0040.00422.17
8.2.110.0060.00320.34
8.2.100.0080.00418.09
8.2.90.0000.00819.28
8.2.80.0000.00817.97
8.2.70.0000.00917.50
8.2.60.0000.00817.80
8.2.50.0040.00818.07
8.2.40.0040.00418.03
8.2.30.0000.00919.16
8.2.20.0060.00317.66
8.2.10.0040.00417.99
8.2.00.0030.00517.60
8.1.280.0120.00825.92
8.1.270.0050.00324.01
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0030.00623.66
8.1.230.0080.00319.18
8.1.220.0040.00417.74
8.1.210.0070.00018.77
8.1.200.0030.00617.22
8.1.190.0090.00017.11
8.1.180.0040.00418.10
8.1.170.0000.01018.20
8.1.160.0070.00021.91
8.1.150.0040.00418.69
8.1.140.0000.00717.38
8.1.130.0000.00817.86
8.1.120.0070.00017.29
8.1.110.0040.00417.43
8.1.100.0000.00817.29
8.1.90.0050.00317.37
8.1.80.0050.00217.32
8.1.70.0030.00317.33
8.1.60.0000.00717.43
8.1.50.0040.00417.43
8.1.40.0060.00317.32
8.1.30.0030.00517.45
8.1.20.0040.00417.59
8.1.10.0000.00817.38
8.1.00.0040.00417.45
8.0.300.0000.00718.77
8.0.290.0040.00416.75
8.0.280.0000.00718.37
8.0.270.0040.00416.71
8.0.260.0000.00617.11
8.0.250.0070.00017.00
8.0.240.0000.00716.83
8.0.230.0030.00316.86
8.0.220.0030.00316.79
8.0.210.0030.00316.90
8.0.200.0030.00316.87
8.0.190.0030.00516.93
8.0.180.0000.00716.92
8.0.170.0000.00716.86
8.0.160.0000.00816.94
8.0.150.0000.00716.73
8.0.140.0040.00416.89
8.0.130.0050.00013.27
8.0.120.0040.00416.80
8.0.110.0070.00016.86
8.0.100.0000.00816.92
8.0.90.0040.00416.91
8.0.80.0100.00616.77
8.0.70.0050.00216.86
8.0.60.0040.00416.90
8.0.50.0040.00416.81
8.0.30.0160.00617.00
8.0.20.0090.01417.40
8.0.10.0000.00716.87
8.0.00.0110.00816.85
7.4.330.0030.00315.13
7.4.320.0000.00716.66
7.4.300.0000.00616.57
7.4.290.0030.00316.39
7.4.280.0040.00416.54
7.4.270.0000.00716.52
7.4.260.0000.00816.45
7.4.250.0040.00416.47
7.4.240.0030.00316.49
7.4.230.0030.00316.40
7.4.220.0070.01116.63
7.4.210.0000.01416.59
7.4.200.0000.00716.25
7.4.160.0060.00916.57
7.4.150.0030.01517.40
7.4.140.0090.00817.86
7.4.130.0130.00916.42
7.4.120.0120.00516.55
7.4.110.0130.00316.42
7.4.100.0130.00316.48
7.4.90.0030.01916.34
7.4.80.0070.01116.44
7.4.70.0090.01216.58
7.4.60.0040.01216.47
7.4.50.0050.00316.44
7.4.40.0030.01316.70
7.4.30.0030.01316.72
7.4.00.0060.01215.05
7.3.330.0000.00613.23
7.3.320.0050.00013.24
7.3.310.0000.00716.36
7.3.300.0030.00316.38
7.3.290.0000.01516.41
7.3.280.0060.01016.36
7.3.270.0090.01517.40
7.3.260.0160.00816.31
7.3.250.0130.00716.53
7.3.240.0070.01416.61
7.3.230.0140.00316.44
7.3.210.0090.00916.62
7.3.200.0080.01019.39
7.3.190.0040.01416.40
7.3.180.0060.01216.49
7.3.170.0030.01316.67
7.3.160.0080.00816.44
7.2.330.0100.00716.56
7.2.320.0140.00316.80
7.2.310.0180.01216.51
7.2.300.0080.00816.77
7.2.290.0090.01516.77
7.2.60.0100.00316.76
7.2.00.0030.00919.46
7.1.200.0000.01315.73
7.1.100.0000.01117.83
7.1.70.0080.00017.16
7.1.60.0090.01519.32
7.1.50.0040.01816.82
7.1.00.0030.07722.28
7.0.200.0060.00316.75
7.0.140.0000.07722.00
7.0.60.0030.08020.02
7.0.50.0100.03717.89
7.0.40.0070.05720.04
7.0.30.0330.07320.26
7.0.20.0270.07020.34
7.0.10.0000.05720.08
7.0.00.0070.04320.33
5.6.280.0000.07721.13
5.6.210.0030.04020.69
5.6.200.0030.08718.14
5.6.190.0100.09020.45
5.6.180.0370.06720.60
5.6.170.0170.05020.71
5.6.160.0070.05020.46
5.6.150.0100.06318.18
5.6.140.0000.04318.28
5.6.130.0030.04318.18
5.6.120.0070.08021.00
5.6.110.0030.05021.04
5.6.100.0070.08321.09
5.6.90.0070.04721.12
5.6.80.0130.07320.40
5.5.350.0200.08720.41
5.5.340.0000.06317.95
5.5.330.0000.05020.22
5.5.320.0330.06320.35
5.5.310.0230.08320.34
5.5.300.0130.06318.01
5.5.290.0130.08018.08
5.5.280.0000.07720.85
5.5.270.0070.04020.67
5.5.260.0000.04320.97
5.5.250.0070.04020.75
5.5.240.0000.08020.26
5.4.450.0730.04719.45
5.4.440.0130.05719.72
5.4.430.0570.06719.38
5.4.420.0600.05719.61
5.4.410.0030.07719.48
5.4.400.0800.06319.15
5.4.390.0970.07019.15
5.4.380.0470.04718.84
5.4.370.0400.05718.59
5.4.360.0330.05318.59
5.4.350.0330.06018.75
5.4.340.0330.05318.57
5.4.320.0100.03712.50
5.4.310.0070.04012.49
5.4.300.0080.03512.50
5.4.290.0110.03412.50
5.4.280.0080.03312.40
5.4.270.0110.03112.39
5.4.260.0060.04112.39
5.4.250.0070.03812.39
5.4.240.0060.03612.39
5.4.230.0050.03812.38
5.4.220.0050.03712.39
5.4.210.0070.03612.39
5.4.200.0100.04612.38
5.4.190.0090.03312.39
5.4.180.0100.04712.38
5.4.170.0080.04312.39
5.4.160.0090.03412.39
5.4.150.0070.03512.38
5.4.140.0050.03812.07
5.4.130.0060.03612.05
5.4.120.0060.03612.02
5.4.110.0050.03712.02
5.4.100.0030.03812.02
5.4.90.0050.03812.01
5.4.80.0060.03612.02
5.4.70.0080.03312.01
5.4.60.0040.03712.00
5.4.50.0080.03312.01
5.4.40.0060.03612.00
5.4.30.0040.03912.00
5.4.20.0090.04112.00
5.4.10.0070.03312.00
5.4.00.0070.03511.48
5.3.290.0070.03712.80
5.3.280.0100.03212.70
5.3.270.0070.03612.73
5.3.260.0070.03712.72
5.3.250.0060.03612.72
5.3.240.0050.04112.72
5.3.230.0070.03612.71
5.3.220.0050.03712.68
5.3.210.0040.04012.68
5.3.200.0060.03712.68
5.3.190.0060.03712.68
5.3.180.0060.03612.67
5.3.170.0070.03512.67
5.3.160.0060.03712.67
5.3.150.0080.04012.67
5.3.140.0090.03912.66
5.3.130.0100.03712.66
5.3.120.0030.04012.66
5.3.110.0080.04212.66
5.3.100.0080.03412.12
5.3.90.0050.03712.10
5.3.80.0040.03812.09
5.3.70.0050.03612.09
5.3.60.0050.03612.07
5.3.50.0070.03512.02
5.3.40.0040.03812.02
5.3.30.0060.03411.98
5.3.20.0060.03511.77
5.3.10.0050.03511.73
5.3.00.0090.03211.71
5.2.170.0030.0319.22
5.2.160.0010.0339.22
5.2.150.0100.0289.22
5.2.140.0050.0329.21
5.2.130.0020.0339.17
5.2.120.0090.0299.18
5.2.110.0070.0289.19
5.2.100.0020.0329.18
5.2.90.0050.0299.18
5.2.80.0050.0289.18
5.2.70.0040.0359.18
5.2.60.0030.0329.12
5.2.50.0070.0279.09
5.2.40.0040.0299.07
5.2.30.0030.0309.05
5.2.20.0080.0249.04
5.2.10.0050.0288.95
5.2.00.0060.0308.81
5.1.60.0040.0248.09
5.1.50.0080.0278.09
5.1.40.0040.0258.07
5.1.30.0060.0258.42
5.1.20.0070.0308.43
5.1.10.0020.0278.17
5.1.00.0040.0258.17
5.0.50.0010.0246.66
5.0.40.0030.0196.51
5.0.30.0050.0296.33
5.0.20.0040.0266.30
5.0.10.0040.0196.27
5.0.00.0040.0346.26
4.4.90.0050.0134.78
4.4.80.0020.0154.76
4.4.70.0030.0154.75
4.4.60.0010.0174.76
4.4.50.0030.0154.77
4.4.40.0020.0264.71
4.4.30.0020.0154.76
4.4.20.0010.0174.84
4.4.10.0030.0154.84
4.4.00.0030.0254.76
4.3.110.0010.0204.67
4.3.100.0020.0194.67
4.3.90.0050.0144.63
4.3.80.0040.0234.58
4.3.70.0030.0144.63
4.3.60.0030.0154.63
4.3.50.0040.0144.63
4.3.40.0030.0244.54
4.3.30.0030.0153.32
4.3.20.0030.0153.30
4.3.10.0010.0173.25
4.3.00.0100.0237.58

preferences:
40.44 ms | 401 KiB | 5 Q