3v4l.org

run code in 300+ PHP versions simultaneously
<?php abstract class AbstractFoo { public $bar; public function __construct() { $this->bar = static::BAR; } } class Foo extends AbstractFoo { //const BAR = 'foobar'; } $foo = new Foo; //Fatal Error: Undefined class constant 'BAR' (uncomment const BAR = 'foobar';) echo $foo->bar;

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.0170.00016.75
8.3.50.0110.00721.02
8.3.40.0030.01218.59
8.3.30.0110.00318.63
8.3.20.0000.00720.42
8.3.10.0040.00421.69
8.3.00.0040.00423.66
8.2.180.0110.01116.50
8.2.170.0150.00022.96
8.2.160.0040.01119.38
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0040.00419.70
8.2.120.0080.00026.35
8.2.110.0100.00020.39
8.2.100.0130.00017.59
8.2.90.0040.00419.05
8.2.80.0000.00817.97
8.2.70.0060.00317.50
8.2.60.0040.00417.80
8.2.50.0100.00018.07
8.2.40.0030.00621.96
8.2.30.0040.00419.31
8.2.20.0000.00717.68
8.2.10.0030.00518.13
8.2.00.0080.00018.06
8.1.280.0110.00725.92
8.1.270.0040.00423.88
8.1.260.0000.00728.09
8.1.250.0070.00028.09
8.1.240.0060.00323.91
8.1.230.0070.00423.93
8.1.220.0050.00317.76
8.1.210.0000.00818.77
8.1.200.0050.00517.23
8.1.190.0080.00017.22
8.1.180.0040.00418.10
8.1.170.0060.00318.59
8.1.160.0000.00820.58
8.1.150.0040.00418.75
8.1.140.0040.00419.50
8.1.130.0070.00017.55
8.1.120.0050.00317.40
8.1.110.0040.00417.41
8.1.100.0000.00717.41
8.1.90.0070.00017.43
8.1.80.0050.00217.30
8.1.70.0030.00317.43
8.1.60.0000.00717.45
8.1.50.0080.00017.51
8.1.40.0050.00317.47
8.1.30.0040.00417.49
8.1.20.0040.00417.66
8.1.10.0070.00017.55
8.1.00.0070.00317.38
8.0.300.0000.00718.77
8.0.290.0000.00716.88
8.0.280.0050.00218.46
8.0.270.0030.00317.19
8.0.260.0030.00317.27
8.0.250.0070.00016.98
8.0.240.0000.00716.93
8.0.230.0040.00416.91
8.0.220.0110.00016.96
8.0.210.0000.00716.90
8.0.200.0030.00316.95
8.0.190.0060.00317.06
8.0.180.0020.00516.88
8.0.170.0050.00216.95
8.0.160.0030.00316.86
8.0.150.0000.00716.88
8.0.140.0000.00816.92
8.0.130.0030.00313.42
8.0.120.0030.00516.83
8.0.110.0040.00416.90
8.0.100.0080.00016.77
8.0.90.0000.00816.92
8.0.80.0000.01816.88
8.0.70.0000.00717.00
8.0.60.0040.00416.90
8.0.50.0030.00317.00
8.0.30.0130.00517.03
8.0.20.0120.01117.40
8.0.10.0040.00416.95
8.0.00.0100.00816.86
7.4.330.0030.00316.78
7.4.320.0030.00316.59
7.4.300.0050.00316.36
7.4.290.0080.00016.45
7.4.280.0030.00616.55
7.4.270.0040.00416.55
7.4.260.0030.00316.57
7.4.250.0070.00016.50
7.4.240.0020.00516.39
7.4.230.0040.00416.38
7.4.220.0040.01716.37
7.4.210.0100.00616.50
7.4.200.0030.00316.61
7.4.160.0120.00916.39
7.4.150.0030.01617.40
7.4.140.0120.00917.86
7.4.130.0100.01016.37
7.4.120.0140.00616.42
7.4.110.0070.01016.71
7.4.100.0060.01016.49
7.4.90.0070.01016.47
7.4.80.0150.00419.39
7.4.70.0090.00616.61
7.4.60.0080.00816.57
7.4.50.0070.01116.40
7.4.40.0070.01116.25
7.4.30.0150.01016.45
7.4.00.0050.01214.85
7.3.330.0020.00213.31
7.3.320.0030.00313.39
7.3.310.0070.00016.32
7.3.300.0000.00716.23
7.3.290.0040.01416.36
7.3.280.0100.00816.38
7.3.270.0110.01417.40
7.3.260.0060.01216.28
7.3.250.0070.01116.46
7.3.240.0080.00816.49
7.3.230.0060.01616.39
7.3.210.0110.00616.39
7.3.200.0030.01819.39
7.3.190.0150.00016.38
7.3.180.0100.00716.47
7.3.170.0120.00316.37
7.3.160.0100.00616.36
7.3.120.0070.00715.00
7.3.110.0140.00314.71
7.3.100.0040.00714.95
7.3.90.0070.00414.84
7.3.80.0090.00614.89
7.3.70.0030.00714.92
7.3.60.0040.00414.65
7.3.50.0090.00615.05
7.3.40.0090.00614.79
7.3.30.0000.01414.79
7.3.20.0090.00616.77
7.3.10.0080.00616.39
7.3.00.0030.01016.74
7.2.330.0050.01116.63
7.2.320.0110.00616.32
7.2.310.0090.00916.53
7.2.300.0070.01516.50
7.2.290.0120.00416.54
7.2.250.0090.00614.80
7.2.240.0000.02015.14
7.2.230.0040.01114.80
7.2.220.0030.01415.06
7.2.210.0030.01214.83
7.2.200.0050.00514.69
7.2.190.0040.01115.05
7.2.180.0060.01214.65
7.2.170.0130.00314.90
7.2.80.0040.01616.57
7.2.60.0070.00716.84
7.2.00.0030.00919.32
7.1.330.0030.01415.75
7.1.320.0080.00615.61
7.1.310.0030.01415.68
7.1.300.0040.01115.57
7.1.290.0100.00315.67
7.1.280.0090.00615.65
7.1.270.0030.01215.35
7.1.260.0030.00915.69
7.1.200.0040.00415.48
7.1.100.0090.00318.11
7.1.70.0000.00817.05
7.1.60.0090.01519.18
7.1.50.0100.01316.83
7.1.00.0000.08022.30
7.0.200.0030.00616.67
7.0.60.0030.08021.66
7.0.50.0100.07717.91
7.0.40.0100.06320.05
7.0.30.0170.04320.16
7.0.20.0230.03320.33
7.0.10.0300.04320.33
7.0.00.0100.08320.30
5.6.280.0030.03321.00
5.6.210.0130.06720.55
5.6.200.0070.03718.29
5.6.190.0030.04320.63
5.6.180.0300.05020.50
5.6.170.0330.06720.50
5.6.160.0070.05720.50
5.6.150.0070.04318.23
5.6.140.0070.07318.19
5.6.130.0070.08018.27
5.6.120.0170.07320.90
5.6.110.0100.07320.99
5.6.100.0030.06321.11
5.6.90.0070.04721.00
5.6.80.0200.07320.50
5.5.350.0230.05320.45
5.5.340.0070.05018.08
5.5.330.0070.03720.34
5.5.320.0230.05020.34
5.5.310.0170.04020.35
5.5.300.0100.07717.94
5.5.290.0030.05318.02
5.5.280.0130.07720.80
5.5.270.0070.09020.64
5.5.260.0070.06320.98
5.5.250.0130.07320.66
5.5.240.0100.06320.03

preferences:
59.28 ms | 401 KiB | 5 Q