3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public $c = 0; public function __construct($c) { print($this->c); $this->c = $c; print($this->c); } } class B extends A { public function __construct($c) { parent::__construct(++$this->c > 0 ? ++$c : -1); } } $b = new B(2);

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.0140.00016.50
8.3.50.0090.01222.83
8.3.40.0140.00018.66
8.3.30.0110.00419.13
8.3.20.0000.00720.39
8.3.10.0040.00423.61
8.3.00.0000.00819.38
8.2.180.0120.00916.50
8.2.170.0070.00722.96
8.2.160.0090.00920.17
8.2.150.0050.00224.18
8.2.140.0050.00324.66
8.2.130.0180.00026.16
8.2.120.0050.00220.96
8.2.110.0060.00319.00
8.2.100.0070.00417.84
8.2.90.0040.00419.34
8.2.80.0000.00817.97
8.2.70.0000.00917.63
8.2.60.0030.00917.93
8.2.50.0040.00718.07
8.2.40.0000.00918.28
8.2.30.0000.00718.04
8.2.20.0040.00417.62
8.2.10.0080.00018.13
8.2.00.0090.00017.61
8.1.280.0070.01325.92
8.1.270.0040.00422.06
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0050.00522.46
8.1.230.0060.00620.96
8.1.220.0060.00318.77
8.1.210.0080.00018.98
8.1.200.0030.00617.25
8.1.190.0040.00417.22
8.1.180.0040.00418.10
8.1.170.0000.00818.59
8.1.160.0040.00421.92
8.1.150.0080.00018.87
8.1.140.0050.00217.45
8.1.130.0000.00717.83
8.1.120.0040.00417.35
8.1.110.0000.00817.43
8.1.100.0040.00417.35
8.1.90.0030.00617.31
8.1.80.0000.00717.48
8.1.70.0040.00417.39
8.1.60.0000.00817.50
8.1.50.0030.00517.54
8.1.40.0040.00417.52
8.1.30.0030.00617.55
8.1.20.0040.00417.59
8.1.10.0070.00017.54
8.1.00.0000.00717.56
8.0.300.0040.00419.84
8.0.290.0040.00416.75
8.0.280.0030.00318.48
8.0.270.0000.00817.22
8.0.260.0040.00417.27
8.0.250.0000.00717.04
8.0.240.0080.00016.86
8.0.230.0000.00716.79
8.0.220.0000.00716.84
8.0.210.0000.00716.75
8.0.200.0060.00016.96
8.0.190.0000.00816.91
8.0.180.0000.00716.82
8.0.170.0040.00416.84
8.0.160.0080.00016.96
8.0.150.0040.00416.75
8.0.140.0050.00216.69
8.0.130.0000.00513.20
8.0.120.0000.00716.85
8.0.110.0040.00416.89
8.0.100.0070.00016.91
8.0.90.0000.00716.72
8.0.80.0060.00916.87
8.0.70.0070.00016.87
8.0.60.0080.00016.79
8.0.50.0040.00416.82
8.0.30.0140.00416.99
8.0.20.0050.01417.40
8.0.10.0080.00016.95
8.0.00.0050.01516.80
7.4.330.0000.00515.03
7.4.320.0060.00016.47
7.4.300.0000.00716.59
7.4.290.0040.00416.51
7.4.280.0040.00416.52
7.4.270.0030.00316.60
7.4.260.0000.00716.49
7.4.250.0030.00316.52
7.4.240.0020.00516.62
7.4.230.0000.00716.63
7.4.220.0060.01216.64
7.4.210.0100.00716.55
7.4.200.0030.00316.39
7.4.160.0060.00916.64
7.4.150.0140.00717.40
7.4.140.0060.01017.86
7.4.130.0100.00716.52
7.4.120.0100.00716.51
7.4.110.0100.00716.21
7.4.100.0140.00416.50
7.4.90.0070.01316.47
7.4.80.0130.00619.39
7.4.70.0140.00416.51
7.4.60.0060.01016.56
7.4.50.0000.00416.43
7.4.40.0030.01516.48
7.4.30.0070.01016.54
7.4.00.0030.01014.80
7.3.330.0000.00613.29
7.3.320.0030.00313.28
7.3.310.0040.00416.34
7.3.300.0040.00416.31
7.3.290.0030.01716.32
7.3.280.0110.00916.32
7.3.270.0030.01417.40
7.3.260.0110.00616.45
7.3.250.0090.00916.49
7.3.240.0120.00316.52
7.3.230.0110.00816.44
7.3.210.0070.01016.60
7.3.200.0120.00619.39
7.3.190.0000.02116.43
7.3.180.0130.00716.52
7.3.170.0130.00316.50
7.3.160.0090.00616.52
7.2.330.0200.00316.54
7.2.320.0130.00416.78
7.2.310.0110.00516.77
7.2.300.0070.01116.53
7.2.290.0120.00616.80
7.2.110.0220.00616.53
7.2.60.0090.00617.16
7.2.00.0040.00819.50
7.1.200.0000.01215.85
7.1.100.0100.00018.10
7.1.70.0000.01317.13
7.1.60.0030.01719.40
7.1.50.0090.01316.84
7.1.00.0100.06722.36
7.0.200.0000.01116.73
7.0.140.0030.07022.09
7.0.60.0100.07319.93
7.0.50.0070.07017.86
7.0.40.0070.08719.96
7.0.30.0130.04320.06
7.0.20.0400.07020.21
7.0.10.0070.04320.22
7.0.00.0000.06720.33
5.6.280.0070.06721.10
5.6.210.0070.03720.71
5.6.200.0130.07318.19
5.6.190.0130.06720.55
5.6.180.0200.04720.67
5.6.170.0300.03720.50
5.6.160.0030.04020.52
5.6.150.0130.04018.25
5.6.140.0200.06718.14
5.6.130.0030.04018.21
5.6.120.0070.09321.15
5.6.110.0130.06321.13
5.6.100.0000.07020.98
5.6.90.0030.05720.96
5.6.80.0070.07720.53
5.5.350.0200.06320.50
5.5.340.0030.08318.02
5.5.330.0000.06320.19
5.5.320.0200.04320.32
5.5.310.0270.07320.17
5.5.300.0070.07718.03
5.5.290.0070.08017.95
5.5.280.0030.04720.77
5.5.270.0070.06720.96
5.5.260.0070.07020.73
5.5.250.0030.06020.58
5.5.240.0000.06720.16
5.4.450.0170.05719.63
5.4.440.0830.05719.53
5.4.430.0670.06319.55
5.4.420.0070.05719.53
5.4.410.0130.05018.72
5.4.400.0230.06318.72
5.4.390.0370.06318.79
5.4.380.0000.06318.59
5.4.370.0030.06018.71
5.4.360.0030.06718.66
5.4.350.0090.05112.03
5.4.340.0050.04912.02
5.4.320.0050.03612.51
5.4.310.0080.04212.50
5.4.300.0030.03712.50
5.4.290.0070.04112.50
5.4.280.0030.04412.40
5.4.270.0060.04312.40
5.4.260.0070.04012.40
5.4.250.0050.03912.40
5.4.240.0090.03612.40
5.4.230.0030.04312.39
5.4.220.0070.04212.39
5.4.210.0070.03412.39
5.4.200.0020.04112.39
5.4.190.0060.03612.39
5.4.180.0060.03612.39
5.4.170.0080.03412.40
5.4.160.0040.04012.39
5.4.150.0090.03412.39
5.4.140.0070.03512.07
5.4.130.0060.03512.07
5.4.120.0040.04612.02
5.4.110.0040.04112.02
5.4.100.0000.04112.01
5.4.90.0090.03912.02
5.4.80.0030.04112.01
5.4.70.0060.04212.02
5.4.60.0060.04012.01
5.4.50.0050.03612.02
5.4.40.0040.03612.00
5.4.30.0050.03512.00
5.4.20.0050.03512.00
5.4.10.0050.03412.00
5.4.00.0110.03611.48
5.3.290.0070.04912.80
5.3.280.0020.04112.71
5.3.270.0060.03812.72
5.3.260.0060.03912.72
5.3.250.0050.03712.72
5.3.240.0090.05312.72
5.3.230.0090.03712.71
5.3.220.0060.04212.68
5.3.210.0050.03812.68
5.3.200.0090.03412.68
5.3.190.0040.03812.68
5.3.180.0070.03612.67
5.3.170.0060.03812.67
5.3.160.0040.03912.67
5.3.150.0060.03612.67
5.3.140.0050.03612.66
5.3.130.0060.03812.65
5.3.120.0040.04012.66
5.3.110.0060.03912.66
5.3.100.0080.03612.13
5.3.90.0050.03912.11
5.3.80.0070.03812.10
5.3.70.0050.03612.10
5.3.60.0060.03512.08
5.3.50.0070.04012.03
5.3.40.0040.03812.03
5.3.30.0070.03411.98
5.3.20.0040.03611.76
5.3.10.0080.03711.73
5.3.00.0070.04011.72
5.2.170.0040.0349.22
5.2.160.0040.0299.23
5.2.150.0080.0359.23
5.2.140.0090.0269.22
5.2.130.0030.0309.18
5.2.120.0060.0349.18
5.2.110.0050.0389.19
5.2.100.0030.0299.18
5.2.90.0060.0279.18
5.2.80.0050.0299.17
5.2.70.0030.0309.17
5.2.60.0030.0309.13
5.2.50.0070.0269.10
5.2.40.0070.0259.07
5.2.30.0030.0309.05
5.2.20.0020.0309.04
5.2.10.0050.0268.95
5.2.00.0030.0298.81
5.1.60.0060.0248.09
5.1.50.0040.0258.09
5.1.40.0040.0248.07
5.1.30.0030.0288.42
5.1.20.0040.0288.44
5.1.10.0060.0298.16
5.1.00.0050.0238.17
5.0.50.0030.0216.64
5.0.40.0060.0226.50
5.0.30.0030.0316.32
5.0.20.0020.0206.28
5.0.10.0040.0266.26
5.0.00.0040.0386.26
4.4.90.0020.0204.77
4.4.80.0020.0174.75
4.4.70.0060.0134.76
4.4.60.0040.0194.76
4.4.50.0030.0184.77
4.4.40.0010.0304.71
4.4.30.0070.0124.76
4.4.20.0030.0164.84
4.4.10.0030.0154.85
4.4.00.0050.0224.75
4.3.110.0010.0174.67
4.3.100.0030.0134.67
4.3.90.0040.0174.64
4.3.80.0020.0344.59
4.3.70.0040.0154.63
4.3.60.0010.0184.63
4.3.50.0040.0194.62
4.3.40.0030.0264.54
4.3.30.0040.0193.30
4.3.20.0020.0163.28
4.3.10.0020.0163.23
4.3.00.0070.0207.12

preferences:
44.59 ms | 401 KiB | 5 Q