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() { echo $this->bar->getVar(); } } interface BarInterface { public function getVar(); } abstract class BarAbstract 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.0120.00916.88
8.3.50.0110.00822.05
8.3.40.0110.00719.02
8.3.30.0140.00018.83
8.3.20.0030.00620.10
8.3.10.0040.00423.47
8.3.00.0080.00419.38
8.2.180.0070.00718.41
8.2.170.0070.00722.96
8.2.160.0070.00720.35
8.2.150.0050.00224.18
8.2.140.0030.00524.66
8.2.130.0090.00019.23
8.2.120.0060.00326.35
8.2.110.0090.00022.02
8.2.100.0110.00018.04
8.2.90.0050.00319.05
8.2.80.0060.00317.97
8.2.70.0040.00417.63
8.2.60.0040.00418.04
8.2.50.0060.00318.07
8.2.40.0000.00819.34
8.2.30.0040.00420.71
8.2.20.0060.00317.73
8.2.10.0050.00218.06
8.2.00.0080.00017.93
8.1.280.0150.00025.92
8.1.270.0050.00523.99
8.1.260.0000.00728.09
8.1.250.0040.00428.09
8.1.240.0030.00621.07
8.1.230.0090.00319.44
8.1.220.0050.00317.74
8.1.210.0040.00418.77
8.1.200.0060.00317.36
8.1.190.0050.00317.23
8.1.180.0080.00018.10
8.1.170.0070.00018.71
8.1.160.0000.00722.02
8.1.150.0040.00418.94
8.1.140.0080.00019.57
8.1.130.0000.00717.67
8.1.120.0070.00017.44
8.1.110.0040.00417.45
8.1.100.0070.00017.45
8.1.90.0040.00417.37
8.1.80.0000.00817.45
8.1.70.0040.00417.26
8.1.60.0040.00417.57
8.1.50.0050.00317.54
8.1.40.0000.00817.51
8.1.30.0070.00317.60
8.1.20.0040.00417.56
8.1.10.0050.00317.54
8.1.00.0040.00417.55
8.0.300.0000.00718.77
8.0.290.0000.00716.75
8.0.280.0000.00718.45
8.0.270.0100.00017.11
8.0.260.0070.00017.23
8.0.250.0080.00016.93
8.0.240.0000.00616.92
8.0.230.0070.00017.06
8.0.220.0040.00316.89
8.0.210.0000.00716.91
8.0.200.0040.00416.93
8.0.190.0000.00716.85
8.0.180.0050.00216.87
8.0.170.0000.00816.91
8.0.160.0000.00717.05
8.0.150.0030.00516.81
8.0.140.0000.00716.89
8.0.130.0000.00713.36
8.0.120.0000.00816.90
8.0.110.0070.00016.88
8.0.100.0000.00716.82
8.0.90.0040.00417.03
8.0.80.0110.00816.99
8.0.70.0080.00017.03
8.0.60.0070.00016.93
8.0.50.0000.00716.84
8.0.30.0090.00817.07
8.0.20.0110.00817.40
8.0.10.0000.00717.07
8.0.00.0100.00816.71
7.4.330.0050.00016.84
7.4.320.0000.00616.63
7.4.300.0000.00616.56
7.4.290.0070.00016.49
7.4.280.0040.00416.59
7.4.270.0070.00016.49
7.4.260.0050.00316.44
7.4.250.0000.00816.52
7.4.240.0040.00416.52
7.4.230.0020.00516.50
7.4.220.0090.01616.61
7.4.210.0090.00716.62
7.4.200.0030.00316.49
7.4.160.0100.00616.51
7.4.150.0120.00717.40
7.4.140.0120.00717.86
7.4.130.0180.00416.54
7.4.120.0130.00516.61
7.4.110.0040.01416.59
7.4.100.0070.01116.48
7.4.90.0100.00716.45
7.4.80.0140.00319.39
7.4.70.0100.00716.49
7.4.60.0080.00816.31
7.4.50.0040.01116.17
7.4.40.0070.01516.43
7.4.30.0150.00616.49
7.4.00.0040.01015.02
7.3.330.0050.00013.30
7.3.320.0030.00313.38
7.3.310.0050.00216.32
7.3.300.0040.00416.22
7.3.290.0000.00816.32
7.3.280.0110.00816.27
7.3.270.0140.00317.40
7.3.260.0130.00916.41
7.3.250.0130.00616.26
7.3.240.0070.01316.37
7.3.230.0060.00916.39
7.3.210.0090.00916.32
7.3.200.0080.00816.57
7.3.190.0130.00316.38
7.3.180.0060.00916.56
7.3.170.0070.01416.61
7.3.160.0090.00616.30
7.3.120.0030.01314.98
7.3.110.0060.01014.79
7.3.100.0090.00914.61
7.3.90.0090.00914.84
7.3.80.0090.00614.56
7.3.70.0030.01014.70
7.3.60.0090.00614.84
7.3.50.0100.00714.61
7.3.40.0110.00314.82
7.3.30.0100.00714.91
7.3.20.0110.00416.64
7.3.10.0060.00816.52
7.3.00.0080.00716.30
7.2.330.0120.00616.82
7.2.320.0100.01416.42
7.2.310.0070.01016.71
7.2.300.0100.00716.84
7.2.290.0110.01216.78
7.2.250.0000.02015.04
7.2.240.0110.00815.27
7.2.230.0040.01115.06
7.2.220.0090.00615.14
7.2.210.0000.01215.27
7.2.200.0040.01115.06
7.2.190.0030.01015.04
7.2.180.0060.00815.19
7.2.170.0100.00715.09
7.2.130.0080.01016.78
7.2.120.0120.00316.37
7.2.110.0000.01316.38
7.2.100.0070.00716.72
7.2.90.0260.00316.95
7.2.80.0100.01016.87
7.2.70.0190.00416.79
7.2.60.0110.00716.64
7.2.50.0180.01116.63
7.2.40.0080.00816.37
7.2.30.0140.01116.50
7.2.20.0170.01016.42
7.2.10.0120.00916.36
7.2.00.0080.00818.17
7.1.330.0110.00315.62
7.1.320.0070.00715.75
7.1.310.0030.00615.39
7.1.300.0110.00315.77
7.1.290.0030.01315.45
7.1.280.0000.01315.43
7.1.270.0100.00715.79
7.1.260.0030.01315.80
7.1.250.0110.00715.04
7.1.100.0100.00617.78
7.1.70.0040.00417.13
7.1.60.0100.01019.48
7.1.50.0070.01016.98
7.1.00.0030.07722.37
7.0.200.0290.00414.53
7.0.60.0170.05020.01
7.0.50.0030.04017.86
7.0.40.0030.07020.11
7.0.30.0230.04320.34
7.0.20.0270.07320.08
7.0.10.0070.04720.23
7.0.00.0100.07720.23
5.6.280.0100.05020.93
5.6.210.0100.04020.48
5.6.200.0130.07718.16
5.6.190.0070.07320.48
5.6.180.0230.04020.46
5.6.170.0230.04720.62
5.6.160.0000.08720.46
5.6.150.0100.03718.15
5.6.140.0130.07718.17
5.6.130.0130.06318.25
5.6.120.0130.04720.95
5.6.110.0130.08021.10
5.6.100.0070.04021.14
5.6.90.0100.07021.04
5.6.80.0070.08020.41
5.5.350.0300.07720.34
5.5.340.0030.04017.98
5.5.330.0030.04020.31
5.5.320.0030.06720.42
5.5.310.0200.05020.27
5.5.300.0070.05017.95
5.5.290.0100.06317.92
5.5.280.0070.05320.88
5.5.270.0100.08320.87
5.5.260.0030.04020.90
5.5.250.0070.08020.70
5.5.240.0270.07020.16

preferences:
52 ms | 401 KiB | 5 Q