3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface intf{ public function setVar($a); public function getVar(); } class A implements intf{ private $A; public function setVar($a){ $this->A=$a; } public function getVar(){ return $this->A; } } class B extends Abs{ private $B; public function setVar($a){ $this->B=$a; } public function getVar(){ return $this->B; } } abstract class Abs{ abstract public function setVar($a); abstract public function getVar(); public function getDouble($a){ return $a*2; } } $A=new A(); $B=new B(); $A->setVar(2); echo ' Class A: '.$A->getVar(); $B->setVar(4); echo ' Class B: '.$B->getVar(); echo ' Class B Double: '.$B->getDouble($B->getVar()); echo ' Class A Double: '.$B->getDouble($A->getVar());

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.00618.43
8.3.50.0140.00416.63
8.3.40.0100.00318.67
8.3.30.0070.00718.89
8.3.20.0080.00019.15
8.3.10.0050.00223.66
8.3.00.0070.00319.68
8.2.180.0070.01118.43
8.2.170.0150.00322.96
8.2.160.0070.00720.39
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0030.00620.18
8.2.120.0070.00026.35
8.2.110.0130.00620.30
8.2.100.0090.00317.72
8.2.90.0000.00819.13
8.2.80.0000.00818.03
8.2.70.0000.00817.63
8.2.60.0040.00417.91
8.2.50.0060.00318.10
8.2.40.0000.00720.42
8.2.30.0000.00720.91
8.2.20.0060.00318.13
8.2.10.0040.00418.09
8.2.00.0030.00618.09
8.1.280.0110.00725.92
8.1.270.0070.00323.84
8.1.260.0050.00226.35
8.1.250.0040.00428.09
8.1.240.0050.00520.80
8.1.230.0040.00818.97
8.1.220.0040.00417.74
8.1.210.0050.00518.77
8.1.200.0040.00417.36
8.1.190.0060.00317.23
8.1.180.0030.00618.10
8.1.170.0040.00418.49
8.1.160.0040.00419.09
8.1.150.0030.00520.71
8.1.140.0000.00919.51
8.1.130.0030.00318.97
8.1.120.0040.00417.54
8.1.110.0050.00317.39
8.1.100.0050.00317.48
8.1.90.0050.00317.43
8.1.80.0040.00417.38
8.1.70.0000.00817.53
8.1.60.0080.00017.51
8.1.50.0070.00017.59
8.1.40.0030.00617.50
8.1.30.0000.00817.73
8.1.20.0040.00417.51
8.1.10.0030.00517.51
8.1.00.0070.00017.59
8.0.300.0000.00818.77
8.0.290.0040.00416.88
8.0.280.0000.00818.52
8.0.270.0030.00317.22
8.0.260.0080.00016.73
8.0.250.0070.00017.01
8.0.240.0040.00417.04
8.0.230.0000.00716.97
8.0.220.0030.00316.85
8.0.210.0050.00216.82
8.0.200.0000.00717.00
8.0.190.0030.00616.86
8.0.180.0060.00316.89
8.0.170.0050.00216.98
8.0.160.0000.00716.92
8.0.150.0070.00016.93
8.0.140.0040.00416.94
8.0.130.0000.00513.34
8.0.120.0030.00516.92
8.0.110.0020.00516.81
8.0.100.0070.00016.80
8.0.90.0040.00416.75
8.0.80.0070.01516.92
8.0.70.0000.00716.95
8.0.60.0040.00416.86
8.0.50.0000.00716.82
8.0.30.0110.00717.05
8.0.20.0100.00817.41
8.0.10.0030.00317.00
8.0.00.0090.00916.89
7.4.330.0050.00015.55
7.4.320.0030.00316.44
7.4.300.0000.00716.46
7.4.290.0000.00916.54
7.4.280.0040.00416.39
7.4.270.0040.00416.64
7.4.260.0030.00313.31
7.4.250.0070.00016.55
7.4.240.0000.00716.51
7.4.230.0070.00016.38
7.4.220.0050.01416.52
7.4.210.0030.01216.66
7.4.200.0050.00316.43
7.4.160.0040.01216.67
7.4.150.0110.00617.40
7.4.140.0120.00817.86
7.4.130.0180.00516.56
7.4.120.0130.00816.49
7.4.110.0080.01116.60
7.4.100.0130.02616.56
7.4.90.0130.00416.53
7.4.80.0140.00419.39
7.4.70.0060.00916.46
7.4.60.0060.00916.43
7.4.50.0110.00716.68
7.4.40.0100.00616.62
7.4.30.0100.00616.46
7.4.00.0030.01214.90
7.3.330.0040.00413.14
7.3.320.0030.00313.18
7.3.310.0030.00516.32
7.3.300.0030.00316.27
7.3.290.0070.00716.32
7.3.280.0060.01016.30
7.3.270.0030.01317.40
7.3.260.0110.00616.44
7.3.250.0100.00816.39
7.3.240.0080.01016.39
7.3.230.0140.00416.38
7.3.210.0030.01316.61
7.3.200.0100.01316.68
7.3.190.0070.01016.30
7.3.180.0040.01716.74
7.3.170.0060.01116.28
7.3.160.0100.00616.52
7.2.330.0070.02016.71
7.2.320.0100.00716.86
7.2.310.0090.00816.45
7.2.300.0030.01316.83
7.2.290.0070.01016.61
7.2.60.0000.01317.07
7.2.00.0100.00719.48
7.1.200.0110.00315.80
7.1.100.0790.01316.23
7.1.70.0080.00517.13
7.1.60.2470.02333.28
7.1.50.2600.01333.02
7.1.40.3270.01332.40
7.1.30.0400.02332.70
7.1.20.3770.03032.35
7.1.10.2500.02014.55
7.1.00.2530.01314.85
7.0.200.3400.01015.14
7.0.190.2330.01014.84
7.0.180.2300.02014.46
7.0.170.3730.01014.38
7.0.160.3300.01714.66
7.0.150.2700.01014.29
7.0.140.2600.01014.47
7.0.130.2070.01314.64
7.0.120.2070.01014.61
7.0.110.2770.01314.27
7.0.100.1770.01314.58
7.0.90.2570.01714.38
7.0.80.1930.01014.52
7.0.70.2200.01014.50
7.0.60.2370.02014.08
7.0.50.1670.01314.52
7.0.40.2130.02014.53
7.0.30.1700.01314.51
7.0.20.2400.00314.49
7.0.10.2200.01014.64
7.0.00.2070.01014.66

preferences:
50.19 ms | 401 KiB | 5 Q