3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ParentClass { private $first_name; private $last_name; private $gender; private $age; public function __construct($a, $b, $c, $d = null) { $this->first_name = $a; $this->last_name = $b; $this->gender = $c; $this->age = $d. PHP_EOL; //print 'Parent: ' . $a . $b . $c . $d . PHP_EOL; } public function getFirstName(){ return $this->first_name; } } class ChildClass extends ParentClass { public function __construct() { parent::__construct(1, 9, 3, 7); } } $child = new ChildClass(); echo "<br />"; $child->getFirstName();

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.40.0160.00018.79
8.3.30.0030.01418.70
8.3.20.0040.00419.13
8.3.10.0000.00823.65
8.3.00.0030.00623.65
8.2.170.0080.00822.96
8.2.160.0090.00618.95
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0040.00420.58
8.2.120.0050.00226.35
8.2.110.0000.01121.02
8.2.100.0080.00417.47
8.2.90.0090.00017.63
8.2.80.0050.00317.97
8.2.70.0040.00417.80
8.2.60.0030.00618.04
8.2.50.0040.00418.10
8.2.40.0040.00419.53
8.2.30.0000.00719.23
8.2.20.0000.00818.05
8.2.10.0080.00019.45
8.2.00.0000.00819.44
8.1.270.0040.00422.07
8.1.260.0000.00726.35
8.1.250.0040.00428.09
8.1.240.0090.00021.36
8.1.230.0040.00820.91
8.1.220.0040.00418.77
8.1.210.0050.00318.91
8.1.200.0030.00617.38
8.1.190.0080.00017.09
8.1.180.0070.00018.10
8.1.170.0050.00218.67
8.1.160.0000.01018.71
8.1.150.0000.00718.71
8.1.140.0000.00717.93
8.1.130.0030.00319.07
8.1.120.0040.00417.29
8.1.110.0070.00017.42
8.1.100.0030.00317.41
8.1.90.0040.00417.36
8.1.80.0040.00417.36
8.1.70.0030.00317.43
8.1.60.0000.00817.61
8.1.50.0080.00017.46
8.1.40.0030.00617.35
8.1.30.0090.00317.72
8.1.20.0050.00217.61
8.1.10.0000.00717.50
8.1.00.0000.00817.56
8.0.300.0000.00819.86
8.0.290.0080.00016.63
8.0.280.0050.00318.46
8.0.270.0000.00717.27
8.0.260.0000.00617.29
8.0.250.0030.00316.95
8.0.240.0080.00016.87
8.0.230.0030.00716.86
8.0.220.0030.00516.89
8.0.210.0030.00316.83
8.0.200.0030.00516.91
8.0.190.0000.00716.93
8.0.180.0030.00516.80
8.0.170.0080.00016.88
8.0.160.0000.00716.90
8.0.150.0030.00316.87
8.0.140.0040.00416.92
8.0.130.0000.00613.20
8.0.120.0040.00416.79
8.0.110.0020.00516.88
8.0.100.0040.00416.78
8.0.90.0030.00616.78
8.0.80.0060.01216.85
8.0.70.0000.00716.93
8.0.60.0070.00016.71
8.0.50.0040.00416.78
8.0.30.0140.00517.07
8.0.20.0090.01417.40
8.0.10.0040.00416.80
8.0.00.0110.00816.54
7.4.330.0040.00015.55
7.4.320.0000.00816.37
7.4.300.0030.00316.59
7.4.290.0030.00616.59
7.4.280.0030.00616.57
7.4.270.0030.00316.52
7.4.260.0030.00316.42
7.4.250.0040.00416.38
7.4.240.0070.00016.41
7.4.230.0030.00316.32
7.4.220.0040.00416.70
7.4.210.0090.00516.55
7.4.200.0030.00316.39
7.4.160.0090.00816.45
7.4.140.0090.01117.86
7.4.130.0130.00516.50
7.4.120.0090.01216.44
7.4.110.0100.00716.76
7.4.100.0110.01016.66
7.4.90.0120.00616.49
7.4.80.0140.00419.39
7.4.70.0070.01116.59
7.4.60.0130.00316.51
7.4.50.0070.01016.55
7.4.40.0090.00916.46
7.4.00.0110.00315.05
7.3.330.0050.00013.25
7.3.320.0000.00613.06
7.3.310.0030.00316.29
7.3.300.0000.00616.16
7.3.290.0000.00716.22
7.3.280.0060.01316.23
7.3.260.0100.00816.37
7.3.240.0140.00516.46
7.3.230.0130.00616.62
7.3.210.0160.00016.52
7.3.200.0140.00416.50
7.3.190.0040.00216.21
7.3.180.0080.00816.65
7.3.170.0120.00616.47
7.3.160.0130.00616.38
7.3.120.0080.00814.63
7.3.110.0140.00414.54
7.3.100.0030.01014.71
7.3.90.0030.01314.84
7.3.80.0130.00015.01
7.3.70.0000.01114.80
7.3.60.0040.01514.84
7.3.50.0100.01014.85
7.3.40.0060.00614.59
7.3.30.0040.00814.63
7.3.20.0060.00916.63
7.3.10.0100.00316.77
7.3.00.0070.01016.50
7.2.330.0120.00616.80
7.2.320.0130.01016.78
7.2.310.0100.01316.84
7.2.300.0000.01816.57
7.2.290.0060.01016.37
7.2.250.0060.01014.93
7.2.240.0120.00614.95
7.2.230.0030.00615.00
7.2.220.0000.00914.93
7.2.210.0070.01115.32
7.2.200.0000.01515.03
7.2.190.0000.01614.92
7.2.180.0150.00314.96
7.2.170.0060.00614.81
7.2.80.0270.00314.39
7.2.70.0200.01014.58
7.2.60.0230.00314.78
7.2.50.0210.00714.92
7.2.40.0130.01315.13
7.2.30.0190.00714.95
7.2.20.0460.00714.80
7.2.10.0150.00914.59
7.2.00.0160.01014.83
7.1.330.0030.00915.53
7.1.320.0030.00615.61
7.1.310.0030.00915.45
7.1.300.0130.00615.83
7.1.290.0040.00415.79
7.1.280.0060.00615.48
7.1.270.0060.00915.73
7.1.260.0030.01315.81
7.1.200.0040.01115.61
7.1.190.0270.00413.58
7.1.180.0260.00413.65
7.1.170.0220.00913.63
7.1.160.0210.00313.94
7.1.150.0230.00613.64
7.1.140.0180.00613.81
7.1.130.0210.00313.74
7.1.120.0190.00713.57
7.1.110.0230.01013.73
7.1.100.0240.00913.87
7.1.90.0190.00714.04
7.1.80.0200.00714.12
7.1.70.0210.01213.70
7.1.60.1420.00331.55
7.1.50.0300.01031.58
7.1.40.0300.01031.79
7.1.30.0270.01331.70
7.1.20.0300.01331.51
7.1.10.0160.00613.52
7.1.00.0230.00013.80

preferences:
62.95 ms | 400 KiB | 5 Q