3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Config { //declare variables private $kmailtext; function __construct() { $this->kmailtext = "Mail ons"; } public function __get($name) { return $this->$name; } } class someOtherClass extends Config { private $kmailsubject; function __construct() { $this->$kmailsubject = "Subject"; } public function someOtherFunction() { return $this->kmailsubject; } public function __get($name) { if (isset($this->$name)) return $this->$name; return parent::__get($name); } } $config = new someOtherClass(); echo $config->someOtherFunction(), PHP_EOL; echo $config->someFunction();

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.01416.75
8.3.50.0100.01221.98
8.3.40.0070.01118.79
8.3.30.0130.00318.67
8.3.20.0120.00620.39
8.3.10.0040.00423.71
8.3.00.0070.00719.22
8.2.180.0100.01016.63
8.2.170.0070.01022.96
8.2.160.0100.00320.39
8.2.150.0090.00624.18
8.2.140.0060.01024.66
8.2.130.0030.01026.16
8.2.120.0060.00317.38
8.2.110.0090.00322.07
8.2.100.0070.00418.04
8.2.90.0080.00019.05
8.2.80.0040.00417.97
8.2.70.0030.00717.75
8.2.60.0050.00318.04
8.2.50.0040.00418.07
8.2.40.0040.00419.34
8.2.30.0000.00720.63
8.2.20.0000.01017.69
8.2.10.0040.00417.96
8.2.00.0040.00417.95
8.1.280.0110.01125.92
8.1.270.0030.00622.19
8.1.260.0090.00026.35
8.1.250.0100.00328.09
8.1.240.0000.00922.51
8.1.230.0030.00917.66
8.1.220.0000.00917.74
8.1.210.0030.00518.77
8.1.200.0060.00317.25
8.1.190.0000.01017.25
8.1.180.0040.00418.10
8.1.170.0040.00418.57
8.1.160.0080.00022.07
8.1.150.0000.00718.93
8.1.140.0080.00019.66
8.1.130.0000.00717.73
8.1.120.0040.00417.50
8.1.110.0040.00417.46
8.1.100.0040.00417.47
8.1.90.0040.00417.51
8.1.80.0080.00017.49
8.1.70.0030.00317.22
8.1.60.0040.00417.48
8.1.50.0040.00417.53
8.1.40.0040.00717.59
8.1.30.0040.00417.71
8.1.20.0040.00417.55
8.1.10.0080.00017.63
8.1.00.0080.00017.49
8.0.300.0040.00418.77
8.0.290.0040.00416.63
8.0.280.0040.00418.43
8.0.270.0000.00717.20
8.0.260.0060.00017.32
8.0.250.0030.00316.92
8.0.240.0040.00416.95
8.0.230.0050.00217.00
8.0.220.0070.00016.87
8.0.210.0000.00716.98
8.0.200.0060.00016.96
8.0.190.0030.00516.91
8.0.180.0050.00216.90
8.0.170.0000.00817.07
8.0.160.0050.00317.04
8.0.150.0000.00816.98
8.0.140.0030.00416.81
8.0.130.0040.00413.43
8.0.120.0000.00916.91
8.0.110.0000.00716.87
8.0.100.0030.00616.84
8.0.90.0070.00016.80
8.0.80.0040.01416.99
8.0.70.0040.00416.84
8.0.60.0070.00016.92
8.0.50.0040.00416.91
8.0.30.0120.00917.32
8.0.20.0150.00917.41
8.0.10.0040.00416.95
8.0.00.0120.00516.85
7.4.330.0000.00516.80
7.4.320.0030.00316.54
7.4.300.0030.00316.45
7.4.290.0030.00316.54
7.4.280.0050.00216.50
7.4.270.0000.00616.63
7.4.260.0030.00316.61
7.4.250.0000.00716.57
7.4.240.0000.00816.64
7.4.230.0000.00716.64
7.4.220.0160.00616.55
7.4.210.0120.00616.50
7.4.200.0000.00716.60
7.4.160.0080.00816.54
7.4.150.0100.01317.40
7.4.140.0100.00917.86
7.4.130.0090.01016.65
7.4.120.0120.00616.58
7.4.110.0040.01716.54
7.4.100.0180.00016.64
7.4.90.0120.00616.65
7.4.80.0090.00819.39
7.4.70.0070.01016.39
7.4.60.0100.00616.54
7.4.50.0110.00616.27
7.4.40.0190.00016.66
7.4.30.0090.01316.34
7.4.00.0090.00815.16
7.3.330.0030.00313.22
7.3.320.0020.00213.36
7.3.310.0040.00416.46
7.3.300.0000.00716.29
7.3.290.0030.00316.35
7.3.280.0110.00516.42
7.3.270.0150.00917.40
7.3.260.0170.00716.58
7.3.250.0070.01016.42
7.3.240.0110.00516.47
7.3.230.0140.01016.39
7.3.210.0100.00716.31
7.3.200.0080.00816.63
7.3.190.0090.00916.55
7.3.180.0120.01216.43
7.3.170.0060.01516.54
7.3.160.0130.00316.37
7.3.120.0100.01014.70
7.3.110.0100.01015.00
7.3.100.0000.01014.77
7.3.90.0070.01014.64
7.3.80.0040.01114.76
7.3.70.0060.00314.69
7.3.60.0070.00714.93
7.3.50.0030.01214.87
7.3.40.0110.00414.98
7.3.30.0090.00314.68
7.3.20.0030.01216.75
7.3.10.0070.00316.45
7.3.00.0040.00816.42
7.2.330.0150.00316.38
7.2.320.0060.01316.35
7.2.310.0070.01016.53
7.2.300.0130.01016.74
7.2.290.0120.00616.58
7.2.250.0040.01515.07
7.2.240.0070.01015.01
7.2.230.0030.01314.67
7.2.220.0060.00615.29
7.2.210.0090.00614.87
7.2.200.0060.00915.02
7.2.190.0000.01414.98
7.2.180.0000.01014.99
7.2.170.0060.00314.96
7.2.60.0030.00716.87
7.2.00.0030.01319.36
7.1.330.0070.00715.63
7.1.320.0130.00015.76
7.1.310.0030.01015.66
7.1.300.0030.00915.61
7.1.290.0040.00815.71
7.1.280.0060.00315.75
7.1.270.0000.01415.53
7.1.260.0130.00015.86
7.1.200.0120.00315.83
7.1.100.0030.00818.05
7.1.70.0030.01317.07
7.1.60.0090.01619.48
7.1.50.0090.01316.90
7.1.00.0070.07022.47
7.0.200.0690.00314.90
7.0.60.0030.04019.88
7.0.50.0000.09317.88
7.0.40.0100.08320.25
7.0.30.0270.05720.09
7.0.20.0430.07020.07
7.0.10.0170.08320.24
7.0.00.0170.07320.33
5.6.280.0000.04021.14
5.6.210.0070.08020.46
5.6.200.0030.04018.23
5.6.190.0030.05320.52
5.6.180.0230.06720.39
5.6.170.0230.07720.71
5.6.160.0070.08320.69
5.6.150.0100.06718.19
5.6.140.0400.04018.18
5.6.130.0000.05018.28
5.6.120.0170.07321.06
5.6.110.0030.09020.98
5.6.100.0100.07720.98
5.6.90.0100.06721.08
5.6.80.0130.05020.37
5.5.350.3800.04320.43
5.5.340.0030.03717.96
5.5.330.0070.06320.57
5.5.320.0530.07320.31
5.5.310.0230.07320.34
5.5.300.0000.04317.94
5.5.290.0000.08017.95
5.5.280.0030.07720.77
5.5.270.0200.02720.75
5.5.260.0070.04020.74
5.5.250.0030.04320.63
5.5.240.0170.03720.28

preferences:
31.37 ms | 401 KiB | 5 Q