3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { private $name; // private variable private $age; //private variable public function __construct() { $this->name = "a"; } } class B extends A { public function display($name, $age) { $this->name2 = $name; // new name2 variable, NOT A's name $this->age2 = $age; // new age2 variable, NOT A's age echo $this->name2." age is ".$this->age2.PHP_EOL; echo $this->name; } } $ob=new B(); $ob->display("xyz", 23);

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.5.10.0120.00616.68
8.5.00.0120.01019.96
8.4.150.0020.00014.05
8.4.140.0150.00617.78
8.4.130.0070.01317.99
8.4.120.0120.00823.84
8.4.110.0120.00722.38
8.4.100.0120.00817.70
8.4.90.0130.00720.54
8.4.80.0070.00217.81
8.4.70.0060.00217.95
8.4.60.0120.00920.41
8.4.50.0130.00718.97
8.4.40.0040.00417.49
8.4.30.0030.01717.76
8.4.20.0130.00719.54
8.4.10.0090.00019.47
8.3.280.0120.00918.41
8.3.270.0100.00916.65
8.3.260.0120.00716.84
8.3.250.0110.00619.18
8.3.240.0110.00717.06
8.3.230.0100.00916.76
8.3.220.0100.00818.95
8.3.210.0100.00816.96
8.3.200.0040.00416.84
8.3.190.0110.00818.93
8.3.180.0110.00616.67
8.3.170.0110.00718.39
8.3.160.0120.00316.66
8.3.150.0130.00617.29
8.3.140.0000.00816.80
8.3.130.0080.00018.73
8.3.120.0060.00318.91
8.3.110.0060.00320.94
8.3.100.0100.01016.73
8.3.90.0080.00026.77
8.3.80.0060.00316.88
8.3.70.0090.00616.63
8.3.60.0090.01216.75
8.3.50.0070.00818.35
8.3.40.0150.00318.94
8.3.30.0000.01418.67
8.3.20.0000.00820.33
8.3.10.0040.00421.92
8.3.00.0040.00423.53
8.2.290.0070.01216.84
8.2.280.0100.01018.56
8.2.270.0070.01116.84
8.2.260.0110.00719.10
8.2.250.0080.00016.48
8.2.240.0050.00517.12
8.2.230.0100.00022.58
8.2.220.0040.00424.06
8.2.210.0000.00826.77
8.2.200.0060.00316.50
8.2.190.0140.00716.58
8.2.180.0090.01218.29
8.2.170.0070.00718.99
8.2.160.0130.00022.96
8.2.150.0000.00724.18
8.2.140.0040.00424.66
8.2.130.0000.00726.16
8.2.120.0040.00419.89
8.2.110.0080.00322.11
8.2.100.0040.00817.84
8.2.90.0080.00022.40
8.2.80.0080.00017.97
8.2.70.0000.00817.93
8.2.60.0000.00818.03
8.2.50.0000.00818.10
8.2.40.0030.00519.94
8.2.30.0000.00818.07
8.2.20.0050.00217.93
8.2.10.0080.00017.96
8.2.00.0040.00418.06
8.1.330.0110.00822.09
8.1.320.0110.00916.30
8.1.310.0120.00318.47
8.1.300.0070.00317.93
8.1.290.0090.00030.84
8.1.280.0180.00025.92
8.1.270.0030.00520.40
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0060.00322.54
8.1.230.0110.00020.84
8.1.220.0050.00317.75
8.1.210.0040.00418.88
8.1.200.0080.00017.36
8.1.190.0000.00917.35
8.1.180.0040.00418.10
8.1.170.0060.00618.58
8.1.160.0000.00818.89
8.1.150.0000.00720.19
8.1.140.0070.00017.61
8.1.130.0040.00417.37
8.1.120.0030.00617.38
8.1.110.0040.00417.51
8.1.100.0000.00717.48
8.1.90.0030.00317.49
8.1.80.0030.00517.36
8.1.70.0030.00317.43
8.1.60.0040.00417.48
8.1.50.0070.00417.48
8.1.40.0030.00517.59
8.1.30.0000.00817.62
8.1.20.0040.00417.55
8.1.10.0000.00717.52
8.1.00.0000.00817.49
8.0.300.0080.00019.95
8.0.290.0080.00016.75
8.0.280.0070.00018.52
8.0.270.0080.00016.81
8.0.260.0080.00016.92
8.0.250.0000.00717.02
8.0.240.0080.00017.05
8.0.230.0030.00317.04
8.0.220.0030.00316.87
8.0.210.0050.00516.94
8.0.200.0080.00016.96
8.0.190.0060.00616.89
8.0.180.0080.00016.96
8.0.170.0040.00416.95
8.0.160.0040.00416.95
8.0.150.0070.00016.90
8.0.140.0000.00716.93
8.0.130.0070.00013.45
8.0.120.0040.00417.00
8.0.110.0070.00016.94
8.0.100.0040.00416.73
8.0.90.0050.00317.01
8.0.80.0090.00616.95
8.0.70.0040.00417.00
8.0.60.0040.00416.96
8.0.50.0040.00416.73
8.0.30.0080.01217.13
8.0.20.0100.00917.40
8.0.10.0040.00416.96
8.0.00.0030.01316.75
7.4.330.0030.00315.55
7.4.320.0040.00416.62
7.4.300.0000.00616.51
7.4.290.0000.00816.64
7.4.280.0040.00416.66
7.4.270.0030.00316.61
7.4.260.0030.00316.57
7.4.250.0000.00716.43
7.4.240.0060.00316.52
7.4.230.0070.00016.36
7.4.220.0120.00616.55
7.4.210.0060.01316.62
7.4.200.0020.00516.58
7.4.160.0050.01216.60
7.4.150.0100.00717.40
7.4.140.0150.01217.86
7.4.130.0070.01016.45
7.4.120.0060.01216.53
7.4.110.0140.00316.49
7.4.100.0140.00716.45
7.4.90.0100.00716.56
7.4.80.0100.00719.39
7.4.70.0030.01416.29
7.4.60.0070.01016.55
7.4.50.0100.00316.41
7.4.40.0180.00416.54
7.4.30.0070.01516.55
7.4.00.0000.01114.91
7.3.330.0050.00013.28
7.3.320.0060.00013.41
7.3.310.0030.00316.17
7.3.300.0040.00416.41
7.3.290.0000.00816.23
7.3.280.0090.00716.35
7.3.270.0160.00817.40
7.3.260.0130.00916.51
7.3.250.0100.00716.44
7.3.240.0080.00916.41
7.3.230.0110.00516.40
7.3.210.0100.00716.36
7.3.200.0090.01316.46
7.3.190.0100.01316.55
7.3.180.0090.01216.48
7.3.170.0130.00616.45
7.3.160.0100.00716.47
7.3.10.0060.00316.61
7.3.00.0030.00716.45
7.2.330.0060.01216.58
7.2.320.0030.01416.40
7.2.310.0120.00616.71
7.2.300.0050.01116.55
7.2.290.0060.01216.80
7.2.130.0040.00817.08
7.2.120.0110.00417.07
7.2.110.0120.00016.95
7.2.100.0030.00917.16
7.2.90.0030.00917.10
7.2.80.0110.00416.70
7.2.70.0070.00417.09
7.2.60.0040.00916.89
7.2.50.0000.01316.79
7.2.40.0040.01116.78
7.2.30.0080.00316.94
7.2.20.0080.00817.16
7.2.10.0120.00617.13
7.2.00.0070.00716.75
7.1.250.0060.00315.55
7.1.200.0030.00615.88
7.1.100.4530.00715.91
7.1.90.6460.00316.22
7.1.80.5760.01015.71
7.1.70.5350.01015.06
7.1.60.4320.01033.11
7.1.50.4100.01032.85
7.1.40.4450.01432.42
7.1.30.5210.01332.68
7.1.20.4470.01332.56
7.1.10.4830.01214.73
7.1.00.5010.01614.72
7.0.240.4710.01016.10
7.0.230.5940.01315.97
7.0.220.5390.01015.61
7.0.210.3940.01014.94
7.0.200.5350.00714.79
7.0.190.6260.01014.93
7.0.180.4530.01614.38
7.0.170.5860.01014.43
7.0.160.7140.01014.48
7.0.150.4960.01014.36
7.0.140.3680.01214.55
7.0.130.3230.01014.77
7.0.120.4030.01014.42
7.0.110.4450.01014.53
7.0.100.3940.01614.45
7.0.90.4940.01114.42
7.0.80.4980.01614.58
7.0.70.5120.00714.36
7.0.60.5950.01314.43
7.0.50.5780.01314.50
7.0.40.4940.01314.52
7.0.30.6230.01414.50
7.0.20.4090.01014.48
7.0.10.4070.01314.55
7.0.00.4130.00314.55

preferences:
33.78 ms | 403 KiB | 5 Q