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(); } } class BarInterface { public function getVar() {} } abstract class BarAbscract implements BarInterface { public function getVar() { return $this->var; } } class Bar extends BarAbscract { 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.0070.01016.63
8.3.50.0070.01018.18
8.3.40.0070.00718.50
8.3.30.0140.00018.73
8.3.20.0000.00820.30
8.3.10.0050.00323.66
8.3.00.0000.01019.25
8.2.180.0120.00316.36
8.2.170.0070.00722.96
8.2.160.0110.00420.52
8.2.150.0060.00324.18
8.2.140.0080.00024.66
8.2.130.0090.00019.36
8.2.120.0050.00326.35
8.2.110.0070.00319.16
8.2.100.0040.00717.91
8.2.90.0040.00419.04
8.2.80.0060.00317.97
8.2.70.0080.00017.63
8.2.60.0050.00317.91
8.2.50.0040.00418.07
8.2.40.0000.00719.43
8.2.30.0070.00020.54
8.2.20.0000.00917.61
8.2.10.0040.00417.91
8.2.00.0040.00418.05
8.1.280.0110.00425.92
8.1.270.0040.00822.25
8.1.260.0000.00728.09
8.1.250.0040.00428.09
8.1.240.0050.00520.95
8.1.230.0080.00419.30
8.1.220.0000.00817.74
8.1.210.0000.00818.77
8.1.200.0060.00317.22
8.1.190.0040.00417.11
8.1.180.0030.00518.10
8.1.170.0000.00818.57
8.1.160.0000.00722.08
8.1.150.0040.00418.82
8.1.140.0040.00419.63
8.1.130.0030.00317.75
8.1.120.0000.00817.45
8.1.110.0000.00717.31
8.1.100.0060.00317.38
8.1.90.0000.00817.39
8.1.80.0040.00417.30
8.1.70.0000.00717.24
8.1.60.0040.00417.45
8.1.50.0040.00417.49
8.1.40.0080.00017.45
8.1.30.0050.00517.66
8.1.20.0000.00717.56
8.1.10.0040.00417.37
8.1.00.0040.00417.31
8.0.300.0040.00418.77
8.0.290.0000.00716.75
8.0.280.0070.00018.35
8.0.270.0100.00017.21
8.0.260.0030.00317.11
8.0.250.0000.00716.97
8.0.240.0030.00316.96
8.0.230.0030.00316.87
8.0.220.0030.00316.82
8.0.210.0040.00416.89
8.0.200.0040.00416.95
8.0.190.0040.00416.93
8.0.180.0000.00716.89
8.0.170.0060.00316.94
8.0.160.0050.00316.96
8.0.150.0040.00416.83
8.0.140.0030.00316.73
8.0.130.0030.00313.33
8.0.120.0070.00016.88
8.0.110.0070.00016.80
8.0.100.0030.00516.69
8.0.90.0040.00416.78
8.0.80.0000.02116.93
8.0.70.0000.00716.79
8.0.60.0000.00716.79
8.0.50.0000.00816.72
8.0.30.0060.01417.10
8.0.20.0220.01117.40
8.0.10.0000.00716.84
8.0.00.0090.00916.78
7.4.330.0060.00016.79
7.4.320.0060.00016.53
7.4.300.0030.00316.35
7.4.290.0030.00316.50
7.4.280.0030.00516.44
7.4.270.0000.00716.46
7.4.260.0050.00316.44
7.4.250.0040.00416.46
7.4.240.0000.00716.49
7.4.230.0060.00016.57
7.4.220.0070.01016.39
7.4.210.0020.01316.58
7.4.200.0030.00316.43
7.4.160.0060.00916.38
7.4.150.0100.00717.40
7.4.140.0100.00817.86
7.4.130.0160.00816.48
7.4.120.0090.00716.47
7.4.110.0070.01016.36
7.4.100.0100.00716.55
7.4.90.0110.00616.43
7.4.80.0120.00919.39
7.4.70.0140.00316.40
7.4.60.0100.00716.50
7.4.50.0100.00716.25
7.4.40.0100.00716.49
7.4.30.0030.01516.42
7.4.00.0060.01214.93
7.3.330.0000.00513.07
7.3.320.0000.00612.98
7.3.310.0070.00016.27
7.3.300.0000.00716.11
7.3.290.0070.00016.07
7.3.280.0060.01216.20
7.3.270.0080.00917.40
7.3.260.0120.00616.25
7.3.250.0080.00916.30
7.3.240.0090.01216.40
7.3.230.0100.00616.39
7.3.210.0140.00616.15
7.3.200.0140.00816.36
7.3.190.0090.00916.42
7.3.180.0030.01316.41
7.3.170.0070.01416.37
7.3.160.0060.01016.45
7.3.10.0220.00716.18
7.3.00.0030.01316.75
7.2.330.0090.00916.57
7.2.320.0070.01516.46
7.2.310.0060.01016.53
7.2.300.0140.00316.65
7.2.290.0070.01016.50
7.2.130.0170.00316.38
7.2.120.0220.00416.79
7.2.110.0080.01216.34
7.2.100.0250.00216.29
7.2.90.0150.00416.48
7.2.80.0190.01116.27
7.2.70.0170.00316.44
7.2.60.0080.01016.46
7.2.50.0100.01016.02
7.2.40.0070.01116.33
7.2.30.0090.00916.00
7.2.20.0070.01316.07
7.2.10.0040.01516.29
7.2.00.0060.01018.03
7.1.250.0160.01115.11
7.1.200.0040.00415.46
7.1.100.0080.00618.08
7.1.70.0000.00817.00
7.1.60.0080.01519.48
7.1.50.0140.01016.58
7.1.00.0030.07322.45
7.0.200.0310.00314.63
7.0.60.0100.03719.93
7.0.50.0100.04317.91
7.0.40.0030.09019.96
7.0.30.0230.04320.09
7.0.20.0200.09020.19
7.0.10.0170.05320.19
7.0.00.0230.07020.26
5.6.280.0170.06021.11
5.6.210.0070.05320.57
5.6.200.0070.08018.18
5.6.190.0030.08720.42
5.6.180.0300.06320.49
5.6.170.0100.04720.52
5.6.160.0100.07320.44
5.6.150.0000.06018.16
5.6.140.0030.07718.18
5.6.130.0070.04318.12
5.6.120.0030.08721.04
5.6.110.0100.04720.89
5.6.100.0070.04021.00
5.6.90.0170.07321.13
5.6.80.0100.07020.36
5.5.350.0300.07320.41
5.5.340.0100.04017.98
5.5.330.0000.04320.29
5.5.320.0030.05020.37
5.5.310.0300.04720.50
5.5.300.0100.04017.98
5.5.290.0130.06317.95
5.5.280.0130.07720.77
5.5.270.0100.08020.95
5.5.260.0000.04320.73
5.5.250.0130.07720.67
5.5.240.0270.07020.27

preferences:
41.71 ms | 400 KiB | 5 Q