3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { protected $bar; public function __construct(BarInterface $bar) { $this->bar = $bar; } public function doAction() { $bar->getVar(); } } interface BarInterface { public function getVar(); } abstract class BarAbscract implements BarInterface { public function getVar() { return $this->var; } } class Bar extends BarAbstract { protected $var = __CLASS__; } class Baz extends BarAbstract { protected $var = __CLASS__; } $bar = new Bar(); $foo = new Foo($bar); $foo->doAction();

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.0150.00316.63
8.3.50.0130.00921.92
8.3.40.0140.00418.91
8.3.30.0110.00418.84
8.3.20.0040.00420.16
8.3.10.0040.00423.70
8.3.00.0090.00019.25
8.2.180.0070.01416.86
8.2.170.0170.00322.96
8.2.160.0090.00620.38
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0040.00419.36
8.2.120.0080.00026.35
8.2.110.0060.00320.51
8.2.100.0000.01218.04
8.2.90.0040.00419.13
8.2.80.0040.00417.97
8.2.70.0060.00317.63
8.2.60.0040.00417.80
8.2.50.0030.00618.07
8.2.40.0000.00719.25
8.2.30.0000.00820.63
8.2.20.0000.00917.75
8.2.10.0050.00217.93
8.2.00.0040.00418.12
8.1.280.0150.00025.92
8.1.270.0070.00324.01
8.1.260.0040.00428.09
8.1.250.0080.00028.09
8.1.240.0040.00424.02
8.1.230.0040.00819.44
8.1.220.0040.00417.80
8.1.210.0060.00318.77
8.1.200.0030.00617.25
8.1.190.0030.00517.23
8.1.180.0080.00018.10
8.1.170.0000.00718.71
8.1.160.0000.00721.86
8.1.150.0060.00318.73
8.1.140.0050.00319.48
8.1.130.0020.00517.44
8.1.120.0050.00217.43
8.1.110.0070.00017.38
8.1.100.0000.00717.44
8.1.90.0030.00617.29
8.1.80.0070.00017.45
8.1.70.0040.00417.20
8.1.60.0040.00417.43
8.1.50.0050.00517.45
8.1.40.0030.00517.36
8.1.30.0100.00017.47
8.1.20.0000.00817.50
8.1.10.0000.00817.38
8.1.00.0040.00417.44
8.0.300.0020.00518.77
8.0.290.0000.00716.75
8.0.280.0000.00818.36
8.0.270.0000.01017.26
8.0.260.0000.00818.59
8.0.250.0070.00017.04
8.0.240.0030.00317.07
8.0.230.0030.00316.98
8.0.220.0070.00016.92
8.0.210.0070.00016.86
8.0.200.0000.00916.98
8.0.190.0050.00317.05
8.0.180.0000.00716.87
8.0.170.0040.00416.88
8.0.160.0000.00716.92
8.0.150.0080.00016.79
8.0.140.0000.00716.94
8.0.130.0030.00313.39
8.0.120.0040.00416.88
8.0.110.0000.00716.79
8.0.100.0040.00416.78
8.0.90.0040.00416.76
8.0.80.0140.00716.90
8.0.70.0020.00516.85
8.0.60.0000.00816.81
8.0.50.0050.00216.83
8.0.30.0100.00817.01
8.0.20.0200.01217.40
8.0.10.0030.00516.99
8.0.00.0110.00716.79
7.4.330.0050.00016.78
7.4.320.0060.00016.31
7.4.300.0000.00616.45
7.4.290.0000.00816.45
7.4.280.0060.00316.52
7.4.270.0030.00316.55
7.4.260.0000.00716.29
7.4.250.0040.00416.30
7.4.240.0050.00216.51
7.4.230.0000.00716.60
7.4.220.0090.01216.48
7.4.210.0040.01116.56
7.4.200.0030.00316.35
7.4.160.0060.00916.48
7.4.150.0200.03317.40
7.4.140.0100.01017.86
7.4.130.0120.00916.63
7.4.120.0060.01116.46
7.4.110.0120.00616.25
7.4.100.0140.00316.52
7.4.90.0090.00916.25
7.4.80.0160.00319.39
7.4.70.0170.00016.49
7.4.60.0160.00016.66
7.4.50.0070.01116.42
7.4.40.0100.00716.36
7.4.30.0150.00616.72
7.4.00.0080.00415.06
7.3.330.0020.00213.28
7.3.320.0030.00313.26
7.3.310.0070.00016.29
7.3.300.0060.00016.30
7.3.290.0070.00016.29
7.3.280.0080.01016.24
7.3.270.0030.01417.40
7.3.260.0060.01516.30
7.3.250.0080.01016.50
7.3.240.0150.00316.46
7.3.230.0030.01316.39
7.3.210.0070.01416.48
7.3.200.0070.01316.32
7.3.190.0060.01016.49
7.3.180.0160.00616.41
7.3.170.0100.00616.52
7.3.160.0100.00716.48
7.2.330.0110.00716.52
7.2.320.0060.01216.66
7.2.310.0120.00616.22
7.2.300.0070.01016.32
7.2.290.0090.00916.54
7.2.60.0030.01316.48
7.2.00.0030.00919.30
7.1.200.0000.01215.55
7.1.100.0040.00817.85
7.1.70.0000.00717.04
7.1.60.0100.01319.48
7.1.50.0060.01916.78
7.1.00.0100.07022.36
7.0.200.0170.00714.35
7.0.60.0070.08719.95
7.0.50.0070.03317.86
7.0.40.0070.06320.18
7.0.30.0270.03320.06
7.0.20.0300.05020.30
7.0.10.0070.08720.08
7.0.00.0100.08720.19
5.6.280.0030.04021.13
5.6.210.0100.07720.55
5.6.200.0130.07318.18
5.6.190.0030.05320.47
5.6.180.0270.03720.63
5.6.170.0200.04020.47
5.6.160.0170.07320.55
5.6.150.0000.07718.23
5.6.140.0070.06718.23
5.6.130.0100.08018.15
5.6.120.0030.05321.04
5.6.110.0130.07721.00
5.6.100.0070.04020.96
5.6.90.0070.06321.07
5.6.80.0070.04720.49
5.5.350.0330.07720.39
5.5.340.0030.04018.08
5.5.330.0030.04020.32
5.5.320.0000.05320.42
5.5.310.0200.05020.27
5.5.300.0200.07017.98
5.5.290.0130.06017.98
5.5.280.0070.05020.89
5.5.270.0130.07720.79
5.5.260.0070.04020.88
5.5.250.0100.04720.59
5.5.240.0170.08020.23

preferences:
37.11 ms | 401 KiB | 5 Q