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.4.120.0100.01024.04
8.4.110.0100.00722.36
8.4.100.0040.00517.98
8.4.90.0140.00718.86
8.4.80.0110.00718.79
8.4.70.0160.00618.93
8.4.60.0270.00918.15
8.4.50.0240.01018.92
8.4.40.0260.01017.57
8.4.30.0250.01119.16
8.4.20.0260.01118.05
8.4.10.0240.01319.47
8.3.250.0110.00718.91
8.3.240.0120.00617.35
8.3.230.0130.00616.54
8.3.220.0150.00717.03
8.3.210.0140.00916.93
8.3.200.0240.00716.91
8.3.190.0220.00717.05
8.3.180.0200.00717.60
8.3.170.0200.00617.98
8.3.160.0210.00416.84
8.3.150.0240.01017.92
8.3.140.0240.00616.73
8.3.130.0200.00517.68
8.3.120.0220.00618.86
8.3.110.0190.00617.64
8.3.100.0210.01016.82
8.3.90.0230.00721.87
8.3.80.0260.00316.80
8.3.70.0180.00716.80
8.3.60.0180.00716.80
8.3.50.0190.00521.92
8.3.40.0230.00419.72
8.3.30.0210.00618.27
8.3.20.0190.00620.84
8.3.10.0200.00421.12
8.3.00.0190.00523.96
8.2.290.0100.00820.38
8.2.280.0230.00718.57
8.2.270.0200.00517.02
8.2.260.0250.00418.02
8.2.250.0230.00917.70
8.2.240.0220.00518.01
8.2.230.0180.00219.77
8.2.220.0170.00720.51
8.2.210.0180.00721.87
8.2.200.0200.00616.92
8.2.190.0220.00716.77
8.2.180.0240.00721.45
8.2.170.0220.01218.35
8.2.160.0290.00420.28
8.2.150.0200.00621.58
8.2.140.0200.00621.00
8.2.130.0170.00623.89
8.2.120.0180.00522.10
8.2.110.0120.00421.60
8.2.100.0180.00320.00
8.2.90.0170.00721.61
8.2.80.0160.00721.14
8.2.70.0180.00621.08
8.2.60.0140.00721.15
8.2.50.0150.00721.17
8.2.40.0150.00421.56
8.2.30.0210.00621.50
8.2.20.0150.00621.14
8.2.10.0140.00621.51
8.2.00.0170.00621.67
8.1.330.0110.00722.04
8.1.320.0210.00916.60
8.1.310.0170.00816.88
8.1.300.0220.00818.66
8.1.290.0240.00423.90
8.1.280.0140.00721.45
8.1.270.0140.00920.93
8.1.260.0160.00523.92
8.1.250.0170.00324.54
8.1.240.0140.00721.50
8.1.230.0170.00521.41
8.1.220.0140.00521.04
8.1.210.0160.00621.36
8.1.200.0180.00520.88
8.1.190.0120.00920.80
8.1.180.0080.00721.15
8.1.170.0140.00421.14
8.1.160.0180.00521.37
8.1.150.0150.00721.36
8.1.140.0120.00621.40
8.1.130.0120.00520.02
8.1.120.0120.00620.07
8.1.110.0120.00519.54
8.1.100.0120.00419.52
8.1.90.0100.00619.51
8.1.80.0110.00519.52
8.1.70.0090.00819.54
8.1.60.0160.00419.58
8.1.50.0150.00319.52
8.1.40.0090.00518.99
8.1.30.0080.00619.66
8.1.20.0080.00619.68
8.1.10.0100.00619.62
8.1.00.0120.00519.56
8.0.300.0100.00621.27
8.0.290.0170.00320.60
8.0.280.0100.00521.16
8.0.270.0130.00520.61
8.0.260.0110.00719.80
8.0.250.0140.00319.85
8.0.240.0120.00719.26
8.0.230.0120.00519.29
8.0.220.0100.00619.22
8.0.210.0100.00419.23
8.0.200.0140.00219.25
8.0.190.0100.00619.26
8.0.180.0110.00519.25
8.0.170.0120.00419.24
8.0.160.0130.00519.22
8.0.150.0120.00519.23
8.0.140.0140.00419.21
8.0.130.0120.00418.53
8.0.120.0100.00719.20
8.0.110.0100.00519.21
8.0.100.0110.00518.84
8.0.90.0110.00518.86
8.0.80.0120.00218.55
8.0.70.0100.00518.82
8.0.60.0100.00418.83
8.0.50.0070.00618.82
8.0.30.0100.00518.56
8.0.20.0090.00718.50
8.0.10.0130.00518.48
8.0.00.0130.00718.27
7.4.330.0160.00219.48
7.4.320.0110.00519.11
7.4.300.0110.00219.07
7.4.290.0140.00519.08
7.4.280.0130.00619.06
7.4.270.0150.00319.08
7.4.260.0150.00418.44
7.4.250.0170.00419.06
7.4.240.0170.00519.09
7.4.230.0170.00518.63
7.4.220.0130.00518.66
7.4.210.0120.00818.13
7.4.200.0130.00418.64
7.4.190.0150.00719.11
7.4.180.0150.00719.12
7.4.160.0160.00518.65
7.4.150.0130.00618.50
7.4.140.0150.00418.17
7.4.130.0120.00717.85
7.4.120.0110.00817.97
7.4.110.0120.00717.98
7.4.100.0120.00918.02
7.4.90.0100.00717.99
7.4.80.0120.00617.95
7.4.70.0140.00717.96
7.4.60.0130.00718.00
7.4.50.0120.00617.94
7.4.40.0150.00617.99
7.4.30.0090.00817.93
7.4.20.0100.00718.00
7.4.10.0140.00617.95
7.4.00.0110.00517.98
7.3.330.0140.00518.98
7.3.320.0110.00518.44
7.3.310.0170.00319.04
7.3.300.0100.00418.55
7.3.290.0110.00718.00
7.3.280.0150.00419.00
7.3.270.0150.00618.40
7.3.260.0140.00717.91
7.3.250.0130.01017.95
7.3.240.0100.00817.94
7.3.230.0110.00717.95
7.3.220.0110.00817.93
7.3.210.0150.00617.99
7.3.200.0130.00717.92
7.3.190.0140.00517.93
7.3.180.0130.00717.91
7.3.170.0130.00717.96
7.3.160.0100.00717.94
7.3.150.0100.00817.94
7.3.140.0130.00617.95
7.3.130.0150.00517.97
7.3.120.0130.00617.92
7.3.110.0120.00817.92
7.3.100.0140.00717.91
7.3.90.0140.00618.00
7.3.80.0140.00517.92
7.3.70.0140.00617.96
7.3.60.0150.00517.96
7.3.50.0150.00617.95
7.3.40.0140.00617.95
7.3.30.0140.00717.97
7.3.20.0160.00518.47
7.3.10.0120.00918.46
7.3.00.0190.00918.48

preferences:
27.22 ms | 403 KiB | 5 Q