3v4l.org

run code in 300+ PHP versions simultaneously
<?php abstract class AbstractFoo { public $bar; final public function __construct() { $this->bar = static::BAR; } } class FooBar extends AbstractFoo { const BAR = 'foobar'; } class Foo extends AbstractFoo { //const BAR = 'foobar'; } $fooBar = new FooBar(); var_dump($fooBar->bar); $foo = new Foo(); var_dump($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.130.0050.00318.38
8.3.120.0040.00420.75
8.3.110.0000.00818.30
8.3.100.0000.01116.67
8.3.90.0000.00826.77
8.3.80.0060.00316.63
8.3.70.0100.01016.63
8.3.60.0040.01116.63
8.3.50.0130.00524.40
8.3.40.0140.00322.04
8.3.30.0110.00418.72
8.3.20.0040.00424.18
8.3.10.0080.00024.66
8.3.00.0100.00427.12
8.2.250.0100.01018.42
8.2.240.0060.00319.05
8.2.230.0090.00022.58
8.2.220.0000.00824.06
8.2.210.0040.00426.77
8.2.200.0060.00316.88
8.2.190.0140.00716.58
8.2.180.0110.00725.92
8.2.170.0090.01218.97
8.2.160.0150.00422.96
8.2.150.0070.00025.66
8.2.140.0080.00024.66
8.2.130.0090.00427.12
8.2.120.0090.00424.38
8.2.110.0110.00323.70
8.2.100.0170.00220.66
8.2.90.0040.00823.66
8.2.80.0070.00723.03
8.2.70.0100.00522.86
8.2.60.0050.00722.95
8.2.50.0070.00523.09
8.2.40.0090.00323.68
8.2.30.0050.00723.62
8.2.20.0060.00623.02
8.2.10.0060.00523.60
8.2.00.0110.00523.69
8.1.300.0090.00920.34
8.1.290.0090.00030.84
8.1.280.0070.00725.92
8.1.270.0000.00824.66
8.1.260.0060.00527.22
8.1.250.0120.00028.09
8.1.240.0050.00723.61
8.1.230.0120.00323.46
8.1.220.0090.00322.91
8.1.210.0080.00623.43
8.1.200.0120.00322.72
8.1.190.0020.00922.72
8.1.180.0050.00723.09
8.1.170.0070.00123.22
8.1.160.0120.00323.48
8.1.150.0080.00623.42
8.1.140.0050.00423.44
8.1.130.0070.00520.96
8.1.120.0050.00621.01
8.1.110.0070.00420.08
8.1.100.0080.00320.14
8.1.90.0060.00420.07
8.1.80.0070.00420.09
8.1.70.0040.00820.10
8.1.60.0100.00320.14
8.1.50.0110.00220.11
8.1.40.0060.00519.24
8.1.30.0050.00620.21
8.1.20.0050.00620.24
8.1.10.0070.00520.15
8.1.00.0070.00420.10
8.0.300.0060.00623.43
8.0.290.0100.00222.42
8.0.280.0060.00523.26
8.0.270.0050.00422.43
8.0.260.0050.00620.75
8.0.250.0080.00120.81
8.0.240.0070.00619.83
8.0.230.0070.00419.87
8.0.220.0060.00519.79
8.0.210.0070.00419.80
8.0.200.0090.00319.82
8.0.190.0050.00519.84
8.0.180.0080.00319.82
8.0.170.0070.00419.81
8.0.160.0070.00519.78
8.0.150.0070.00419.79
8.0.140.0090.00419.78
8.0.130.0070.00418.92
8.0.120.0060.00619.76
8.0.110.0060.00519.77
8.0.100.0070.00419.21
8.0.90.0070.00419.24
8.0.80.0110.00218.81
8.0.70.0060.00519.19
8.0.60.0080.00419.21
8.0.50.0060.00619.19
8.0.30.0100.00518.82
8.0.20.0090.00818.72
8.0.10.0110.00518.70
8.0.00.0110.00718.44
7.4.330.0110.00120.32
7.4.320.0070.00419.64
7.4.300.0100.00219.60
7.4.290.0100.00519.61
7.4.280.0090.00519.59
7.4.270.0120.00219.61
7.4.260.0110.00418.81
7.4.250.0150.00419.58
7.4.240.0150.00419.62
7.4.230.0110.00518.96
7.4.220.0100.00419.00
7.4.210.0100.00718.30
7.4.200.0100.00418.97
7.4.190.0120.00719.65
7.4.180.0120.00619.66
7.4.160.0120.00518.98
7.4.150.0130.00618.75
7.4.140.0150.00418.34
7.4.130.0120.00717.95
7.4.120.0100.00818.09
7.4.110.0100.00718.11
7.4.100.0100.00918.15
7.4.90.0100.00718.11
7.4.80.0120.00618.07
7.4.70.0120.00718.08
7.4.60.0110.00718.13
7.4.50.0110.00618.06
7.4.40.0130.00618.12
7.4.30.0070.00918.05
7.4.20.0090.00818.13
7.4.10.0120.00618.07
7.4.00.0100.00618.10
7.3.330.0120.00419.48
7.3.320.0080.00418.81
7.3.310.0150.00219.56
7.3.300.0090.00518.86
7.3.290.0090.00718.15
7.3.280.0110.00419.50
7.3.270.0130.00518.64
7.3.260.0120.00718.03
7.3.250.0120.01018.08
7.3.240.0090.00918.06
7.3.230.0110.00718.08
7.3.220.0100.00918.05
7.3.210.0140.00618.12
7.3.200.0110.00718.04
7.3.190.0120.00518.05
7.3.180.0100.00618.02
7.3.170.0100.00718.08
7.3.160.0080.00818.06
7.3.150.0090.00818.06
7.3.140.0110.00618.07
7.3.130.0130.00518.09
7.3.120.0110.00618.04
7.3.110.0100.00818.04
7.3.100.0130.00718.03
7.3.90.0120.00618.13
7.3.80.0120.00518.04
7.3.70.0120.00518.09
7.3.60.0120.00518.08
7.3.50.0140.00618.08
7.3.40.0130.00618.07
7.3.30.0120.00718.09
7.3.20.0140.00518.56
7.3.10.0100.00918.53
7.3.00.0170.00918.53

preferences:
49.84 ms | 403 KiB | 5 Q