3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Person { private $name; public function __construct($name) { $this->name = $name; } public function getName() { return $this->name; } public function getTitle() { return $this->getName()." the person"; } public function sayHello() { echo "Hello, I'm ".$this->getTitle()."<br/>"; } public function sayGoodbye() { echo "Goodbye from ".self::getTitle()."<br/>"; } } class Geek extends Person { public function __construct($name) { parent::__construct($name); } public function getTitle() { return $this->getName()." the geek"; } } $geekObj = new Geek("Ludwig"); $geekObj->sayHello(); $geekObj->sayGoodbye();

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.70.0090.00616.58
8.3.60.0150.00618.56
8.3.50.0130.00621.10
8.3.40.0110.00418.99
8.3.30.0140.00418.61
8.3.20.0080.00018.75
8.3.10.0060.00321.87
8.3.00.0090.00017.91
8.2.180.0070.01116.60
8.2.170.0040.01122.96
8.2.160.0140.00020.59
8.2.150.0050.00324.18
8.2.140.0000.00824.66
8.2.130.0020.00518.03
8.2.120.0040.00426.35
8.2.110.0030.00621.06
8.2.100.0040.00817.50
8.2.90.0080.00019.05
8.2.80.0080.00017.97
8.2.70.0080.00017.50
8.2.60.0070.00517.52
8.2.50.0060.00717.66
8.2.40.0110.00118.66
8.2.30.0080.00417.63
8.2.20.0020.00617.50
8.2.10.0070.00617.62
8.2.00.0060.00617.66
8.1.280.0120.00325.92
8.1.270.0090.00024.02
8.1.260.0070.00028.09
8.1.250.0000.00828.09
8.1.240.0030.00621.16
8.1.230.0060.00617.76
8.1.220.0050.00317.75
8.1.210.0030.00618.77
8.1.200.0030.00717.35
8.1.190.0080.00417.16
8.1.180.0080.00417.67
8.1.170.0100.00317.83
8.1.160.0080.00419.58
8.1.150.0100.00217.89
8.1.140.0080.00418.34
8.1.130.0070.00517.52
8.1.120.0070.00417.22
8.1.110.0070.00517.23
8.1.100.0050.00717.42
8.1.90.0070.00417.16
8.1.80.0080.00417.17
8.1.70.0070.00517.22
8.1.60.0110.00117.32
8.1.50.0050.00817.34
8.1.40.0090.00517.46
8.1.30.0020.01117.34
8.1.20.0070.00717.45
8.1.10.0100.00417.28
8.1.00.0130.00317.19
8.0.300.0040.00418.77
8.0.290.0030.00516.63
8.0.280.0100.00217.48
8.0.270.0100.00216.84
8.0.260.0070.00516.85
8.0.250.0090.00316.76
8.0.240.0060.00516.69
8.0.230.0110.00216.70
8.0.220.0110.00016.73
8.0.210.0090.00316.64
8.0.200.0090.00416.76
8.0.190.0070.00516.74
8.0.180.0080.00416.66
8.0.170.0090.00416.72
8.0.160.0060.00816.72
8.0.150.0060.00616.74
8.0.140.0090.00416.63
8.0.130.0030.01014.97
8.0.120.0070.00516.69
8.0.110.0080.00416.75
8.0.100.0060.00616.68
8.0.90.0060.00516.69
8.0.80.0150.00716.86
8.0.70.0120.00516.73
8.0.60.0110.00716.68
8.0.50.0090.00816.70
8.0.30.0110.00716.79
8.0.20.0120.00717.08
8.0.10.0150.00416.83
8.0.00.0120.00816.87
7.4.330.0060.00316.16
7.4.320.0080.00316.54
7.4.300.0040.00716.52
7.4.290.0060.00616.52
7.4.280.0100.00116.51
7.4.270.0110.00016.57
7.4.260.0080.00316.49
7.4.250.0060.00616.52
7.4.240.0080.00316.48
7.4.230.0080.00416.59
7.4.220.0100.00216.52
7.4.210.0110.00716.52
7.4.200.0070.00916.58
7.4.190.0070.00716.58
7.4.180.0070.00916.63
7.4.160.0070.01016.48
7.4.150.0080.00816.75
7.4.140.0090.00917.03
7.4.130.0100.00616.42
7.4.120.0080.00816.50
7.4.110.0130.00316.43
7.4.100.0090.00916.57
7.4.90.0080.00816.48
7.4.80.0100.00917.21
7.4.70.0060.01016.43
7.4.60.0090.00716.52
7.4.50.0090.00716.50
7.4.40.0140.00716.40
7.4.30.0090.01016.45
7.4.20.0140.00516.41
7.4.10.0120.00816.46
7.4.00.0070.01116.15
7.3.330.0090.00314.88
7.3.320.0000.01014.82
7.3.310.0080.00316.42
7.3.300.0060.00516.34
7.3.290.0080.00816.33
7.3.280.0110.00616.33
7.3.270.0120.00516.60
7.3.260.0130.00916.37
7.3.250.0090.01016.40
7.3.240.0090.00816.42
7.3.230.0090.00616.38
7.3.220.0110.00616.30
7.3.210.0090.00816.40
7.3.200.0080.01017.09
7.3.190.0140.00516.30
7.3.180.0090.00616.39
7.3.170.0080.00816.38
7.3.160.0110.00816.36
7.3.150.0100.01016.34
7.3.140.0130.00716.34
7.3.130.0130.00816.32
7.3.120.0130.00516.28
7.3.110.0070.01116.29
7.3.100.0100.00516.30
7.3.90.0100.00816.48
7.3.80.0110.00316.30
7.3.70.0070.00816.40
7.3.60.0090.00516.45
7.3.50.0110.00916.38
7.3.40.0060.00916.41
7.3.30.0110.00616.44
7.3.20.0110.01016.49
7.3.10.0150.00916.41
7.3.00.0110.00616.44
7.2.340.0280.01116.44
7.2.330.0160.00816.50
7.2.320.0160.00816.50
7.2.310.0180.00916.51
7.2.300.0170.01016.50
7.2.290.0230.00716.48
7.2.280.0210.01016.39
7.2.270.0180.00916.40
7.2.260.0180.00916.43
7.2.250.0180.01116.38
7.2.240.0220.00616.42
7.2.230.0170.00816.42
7.2.220.0150.01016.41
7.2.210.0210.01116.41
7.2.200.0320.01016.54
7.2.190.0230.00816.50
7.2.180.0200.00816.50
7.2.170.0230.00516.60
7.2.160.0160.01216.54
7.2.150.0210.00916.61
7.2.140.0230.00516.62
7.2.130.0220.00716.70
7.2.120.0210.00716.64
7.2.110.0200.01116.67
7.2.100.0220.00916.71
7.2.90.0230.00616.54
7.2.80.0200.01016.57
7.2.70.0180.01016.54
7.2.60.0230.00516.56
7.2.50.0250.00516.61
7.2.40.0250.00416.60
7.2.30.0230.00416.65
7.2.20.0210.00716.64
7.2.10.0230.00816.59
7.2.00.0240.01017.29
7.1.330.0280.00315.89
7.1.320.0140.01115.86
7.1.310.0240.00916.09
7.1.300.0340.00816.01
7.1.290.0200.00615.97
7.1.280.0140.00916.00
7.1.270.0200.00816.15
7.1.260.0200.00816.13
7.1.250.0190.00716.08
7.1.240.0190.00515.99
7.1.230.0190.00716.12
7.1.220.0190.00616.03
7.1.210.0220.00715.96
7.1.200.0180.00416.00
7.1.190.0160.01016.03
7.1.180.0200.00916.05
7.1.170.0170.01016.05
7.1.160.0170.00916.01
7.1.150.0190.00715.94
7.1.140.0300.00616.00
7.1.130.0220.00315.93
7.1.120.0200.00915.99
7.1.110.0160.00915.95
7.1.100.0190.00716.42
7.1.90.0360.00715.81
7.1.80.0200.00915.93
7.1.70.0170.00616.09
7.1.60.0180.01016.85
7.1.50.0180.00915.98
7.1.40.0160.00916.03
7.1.30.0230.00415.83
7.1.20.0140.01015.84
7.1.10.0200.00615.89
7.1.00.0210.02317.53
7.0.330.0180.00615.63
7.0.320.0170.00915.78
7.0.310.0210.00515.79
7.0.300.0210.01015.75
7.0.290.0150.01015.71
7.0.280.0180.00815.69
7.0.270.0150.01015.81
7.0.260.0180.00615.62
7.0.250.0170.00615.73
7.0.240.0200.00915.70
7.0.230.0150.01215.79
7.0.220.0300.01315.67
7.0.210.0180.00715.64
7.0.200.0120.01116.04
7.0.190.0180.00915.71
7.0.180.0170.00715.70
7.0.170.0170.00615.79
7.0.160.0170.00515.75
7.0.150.0150.00715.68
7.0.140.0210.01015.65
7.0.130.0190.00315.71
7.0.120.0190.00815.78
7.0.110.0240.00815.75
7.0.100.0160.01115.77
7.0.90.0300.00915.71
7.0.80.0190.00815.67
7.0.70.0170.00915.63
7.0.60.0130.02917.20
7.0.50.0210.02016.87
7.0.40.0190.01916.87
7.0.30.0230.02316.87
7.0.20.0290.02116.79
7.0.10.0210.01916.96
7.0.00.0210.02216.85
5.6.400.0180.00616.11
5.6.390.0240.00416.09
5.6.380.0180.01016.11
5.6.370.0210.00916.15
5.6.360.0170.00816.10
5.6.350.0130.01116.17
5.6.340.0200.00416.09
5.6.330.0260.00616.11
5.6.320.0170.00716.07
5.6.310.0220.00516.09
5.6.300.0290.00316.01
5.6.290.0160.01116.09
5.6.280.0130.02417.23
5.6.270.0190.00616.10
5.6.260.0200.00616.10
5.6.250.0200.00416.14
5.6.240.0190.00816.15
5.6.230.0220.00416.20
5.6.220.0210.00816.18
5.6.210.0180.02117.22
5.6.200.0190.02317.46
5.6.190.0230.01917.44
5.6.180.0160.02217.37
5.6.170.0150.02117.44
5.6.160.0170.02217.41
5.6.150.0180.02017.41
5.6.140.0220.01717.37
5.6.130.0180.02617.37
5.6.120.0190.02217.43
5.6.110.0210.02317.31
5.6.100.0170.02417.38
5.6.90.0200.02017.33
5.6.80.0190.02017.20
5.6.70.0180.02117.23
5.6.60.0200.01717.25
5.6.50.0180.02017.29
5.6.40.0260.01717.22
5.6.30.0180.02217.25
5.6.20.0140.02417.19
5.6.10.0180.02017.23
5.6.00.0220.01517.15
5.5.380.0200.00816.18
5.5.370.0230.00616.18
5.5.360.0140.01316.01
5.5.350.0230.02417.11
5.5.340.0230.01917.23
5.5.330.0200.02117.27
5.5.320.0230.02317.21
5.5.310.0190.01917.23
5.5.300.0190.02017.21
5.5.290.0190.01917.27
5.5.280.0120.02217.22
5.5.270.0200.01917.21
5.5.260.0140.02517.19
5.5.250.0160.02317.29
5.5.240.0180.01917.21
5.5.230.0160.02117.18
5.5.220.0180.02217.17
5.5.210.0140.02417.24
5.5.200.0160.02217.03
5.5.190.0150.01817.04
5.5.180.0170.01917.12
5.5.170.0160.01016.00
5.5.160.0170.02117.05
5.5.150.0200.02017.01
5.5.140.0220.01617.03
5.5.130.0240.01717.09
5.5.120.0180.02117.09
5.5.110.0200.01817.02
5.5.100.0170.02217.11
5.5.90.0220.02017.08
5.5.80.0180.01917.07
5.5.70.0190.01717.20
5.5.60.0190.01617.11
5.5.50.0200.01817.09
5.5.40.0200.01717.09
5.5.30.0190.01517.11
5.5.20.0170.01917.11
5.5.10.0170.02117.03
5.5.00.0170.02617.09

preferences:
51.04 ms | 401 KiB | 5 Q