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.60.0120.00616.88
8.3.50.0120.00821.12
8.3.40.0100.00718.68
8.3.30.0090.00619.01
8.3.20.0080.00020.46
8.3.10.0040.00421.94
8.3.00.0030.00519.02
8.2.180.0060.01216.38
8.2.170.0120.00322.96
8.2.160.0070.00720.39
8.2.150.0040.00424.18
8.2.140.0030.00524.66
8.2.130.0090.00926.16
8.2.120.0080.00022.25
8.2.110.0030.00622.11
8.2.100.0060.00617.72
8.2.90.0000.00819.22
8.2.80.0050.00317.97
8.2.70.0040.00417.63
8.2.60.0050.00517.93
8.2.50.0030.00518.07
8.2.40.0030.00620.06
8.2.30.0040.00418.13
8.2.20.0070.00017.63
8.2.10.0000.00717.94
8.2.00.0070.00417.64
8.1.280.0060.00925.92
8.1.270.0030.00623.88
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0100.00023.90
8.1.230.0040.00719.03
8.1.220.0040.00417.74
8.1.210.0080.00018.77
8.1.200.0000.00917.35
8.1.190.0040.00417.66
8.1.180.0040.00418.10
8.1.170.0000.00918.53
8.1.160.0070.00022.06
8.1.150.0090.00018.64
8.1.140.0070.00017.56
8.1.130.0000.00717.74
8.1.120.0000.00717.48
8.1.110.0070.00017.49
8.1.100.0030.00417.50
8.1.90.0100.00017.50
8.1.80.0030.00317.43
8.1.70.0070.00017.41
8.1.60.0000.00917.52
8.1.50.0080.00017.42
8.1.40.0050.00317.42
8.1.30.0060.00317.59
8.1.20.0050.00317.67
8.1.10.0050.00317.54
8.1.00.0040.00417.43
8.0.300.0000.00820.80
8.0.290.0000.00717.18
8.0.280.0000.00718.34
8.0.270.0000.00717.22
8.0.260.0030.00317.25
8.0.250.0070.00016.97
8.0.240.0000.00616.95
8.0.230.0000.00716.87
8.0.220.0030.00316.88
8.0.210.0000.00716.91
8.0.200.0000.00816.93
8.0.190.0000.00816.99
8.0.180.0080.00416.90
8.0.170.0080.00016.80
8.0.160.0040.00416.77
8.0.150.0070.00016.83
8.0.140.0000.00716.84
8.0.130.0000.00513.27
8.0.120.0040.00416.75
8.0.110.0030.00516.88
8.0.100.0000.00816.78
8.0.90.0030.00516.89
8.0.80.0090.01316.84
8.0.70.0000.00816.95
8.0.60.0040.00416.69
8.0.50.0030.00316.89
8.0.30.0140.00416.82
8.0.20.0080.01117.40
8.0.10.0040.00416.93
8.0.00.0100.01016.76
7.4.330.0030.00315.17
7.4.320.0040.00416.45
7.4.300.0000.00616.40
7.4.290.0000.00716.43
7.4.280.0000.00816.60
7.4.270.0000.00716.47
7.4.260.0050.00216.49
7.4.250.0000.00816.61
7.4.240.0000.00716.54
7.4.230.0000.00716.63
7.4.220.0070.01016.70
7.4.210.0080.00916.53
7.4.200.0000.00716.31
7.4.190.0000.00716.55
7.4.160.0060.01216.56
7.4.150.0120.00817.40
7.4.140.0090.00817.86
7.4.130.0040.01216.39
7.4.120.0080.00916.37
7.4.110.0060.01216.42
7.4.100.0050.01816.41
7.4.90.0140.00416.64
7.4.80.0090.00919.39
7.4.70.0080.00816.58
7.4.60.0130.00716.49
7.4.50.0000.00816.40
7.4.40.0000.01122.77
7.4.30.0180.00316.63
7.4.00.0060.01015.19
7.3.330.0020.00213.07
7.3.320.0050.00013.32
7.3.310.0070.00016.34
7.3.300.0040.00416.29
7.3.290.0000.01516.32
7.3.280.0110.00616.28
7.3.270.0170.00017.40
7.3.260.0100.00716.27
7.3.250.0150.00816.61
7.3.240.0080.00816.42
7.3.230.0070.01416.39
7.3.210.0070.01016.33
7.3.200.0070.01519.39
7.3.190.0130.00916.50
7.3.180.0090.00616.26
7.3.170.0200.00016.54
7.3.160.0090.00916.27
7.3.120.0070.01014.72
7.3.70.0070.01114.60
7.3.60.0100.00314.73
7.3.50.0060.00614.57
7.3.40.0040.00814.78
7.3.30.0030.01014.65
7.3.20.0050.01316.26
7.3.10.0070.00716.55
7.3.00.0030.00916.48
7.2.330.0070.01016.79
7.2.320.0040.01316.26
7.2.310.0100.00716.79
7.2.300.0040.01716.84
7.2.290.0090.00916.82
7.2.200.0130.00015.06
7.2.190.0070.00715.32
7.2.180.0100.00314.95
7.2.170.0060.01314.84
7.2.160.0000.01415.20
7.2.150.0100.01316.63
7.2.140.0170.00416.73
7.2.130.0030.01616.86
7.2.120.0060.00616.77
7.2.110.0570.00815.67
7.2.100.0520.01115.65
7.2.90.0550.00515.67
7.2.80.0160.00416.03
7.2.70.0370.00815.79
7.2.60.0130.00515.81
7.2.50.0430.01216.12
7.2.40.0250.00815.88
7.2.30.0390.00616.01
7.2.20.0400.01016.01
7.2.10.0400.01116.04
7.2.00.0200.01017.00
7.1.300.0090.00315.79
7.1.290.0000.01315.79
7.1.280.0090.00315.62
7.1.270.0030.01815.43
7.1.260.0070.00315.47
7.1.250.0090.00315.58
7.1.240.0120.00615.71
7.1.230.0590.00214.70
7.1.220.0610.00914.73
7.1.210.0540.01014.85
7.1.200.0570.00514.71
7.1.190.0470.00914.79
7.1.180.0210.00914.71
7.1.170.0170.00614.70
7.1.160.0490.00614.58
7.1.150.0350.00714.67
7.1.140.0500.00814.63
7.1.130.0170.01014.59
7.1.120.0480.00314.84
7.1.110.0260.01114.79
7.1.100.0520.00915.80
7.1.90.0240.00614.59
7.1.80.0220.00514.97
7.1.70.0150.00415.55
7.1.60.0220.01022.32
7.1.50.0280.01321.42
7.1.40.0240.00823.69
7.1.30.0320.00923.80
7.1.20.0250.01223.50
7.1.10.0160.01114.74
7.1.00.0120.03217.18
7.0.330.0030.00715.30
7.0.320.0140.01415.49
7.0.310.0670.00714.29
7.0.300.0380.01014.42
7.0.290.0550.00614.38
7.0.280.0380.00914.42
7.0.270.0320.00914.43
7.0.260.0380.00414.42
7.0.250.0350.00514.38
7.0.240.0260.01514.42
7.0.230.0290.00714.38
7.0.220.0230.01114.61
7.0.210.0220.00914.46
7.0.200.0170.00315.16
7.0.190.0180.01114.52
7.0.180.0210.00614.29
7.0.170.0240.00714.49
7.0.160.0260.00914.46
7.0.150.0240.00814.61
7.0.140.0150.03116.93
7.0.130.0200.00814.65
7.0.120.0180.00814.54
7.0.110.0200.01014.48
7.0.100.0220.00914.27
7.0.90.0200.01014.51
7.0.80.0200.00614.51
7.0.70.0190.01214.29
7.0.60.0520.02716.29
7.0.50.0180.02915.72
7.0.40.0120.03916.31
7.0.30.0260.02916.34
7.0.20.0250.03015.70
7.0.10.0190.03516.40
7.0.00.0180.02916.44
5.6.400.0090.00914.69
5.6.390.0110.01114.43
5.6.380.0110.00814.36
5.6.370.0140.01214.51
5.6.360.0100.01014.33
5.6.350.0150.00814.38
5.6.340.0120.01314.17
5.6.330.0130.01214.29
5.6.320.0170.00514.29
5.6.310.0130.01114.14
5.6.300.0170.00314.33
5.6.290.0150.01314.41
5.6.280.0170.02716.52
5.6.270.0160.01014.50
5.6.260.0150.00914.46
5.6.250.0200.00814.59
5.6.240.0130.00914.40
5.6.230.0150.00514.21
5.6.220.0180.00414.41
5.6.210.0100.02916.33
5.6.200.0120.02115.71
5.6.190.0130.02316.43
5.6.180.0210.03116.45
5.6.170.0170.02116.40
5.6.160.0140.03416.42
5.6.150.0130.03315.68
5.6.140.0150.02015.60
5.6.130.0110.02115.50
5.6.120.0090.02916.57
5.6.110.0150.03416.53
5.6.100.0080.02216.53
5.6.90.0110.01916.54
5.6.80.0170.02816.46
5.6.70.0120.01114.29
5.6.60.0100.01014.25
5.6.50.0170.00714.42
5.6.40.0120.00814.26
5.6.30.0180.00714.14
5.6.20.0090.01314.14
5.6.10.0110.00814.26
5.6.00.0130.01214.27
5.5.380.0150.00712.77
5.5.370.0170.00712.84
5.5.360.0140.00812.72
5.5.350.1460.01515.39
5.5.340.0100.02014.58
5.5.330.0140.02615.20
5.5.320.0350.02415.37
5.5.310.0180.03315.30
5.5.300.0070.03814.49
5.5.290.0110.01614.49
5.5.280.0160.03115.54
5.5.270.0090.03715.52
5.5.260.0070.02115.27
5.5.250.0070.02015.27
5.5.240.0080.03015.14
5.5.230.0150.00912.63
5.5.220.0170.00312.88
5.5.210.0130.00312.74
5.5.200.0090.01012.59
5.5.190.0110.01112.70
5.5.180.0160.00212.84
5.5.170.0130.00814.36
5.5.160.0120.00612.56
5.5.150.0140.00412.80
5.5.140.0080.00812.76
5.5.130.0060.01112.73
5.5.120.0140.00112.74
5.5.110.0110.00712.45
5.5.100.0140.00912.54
5.5.90.0140.00812.67
5.5.80.0110.01112.60
5.5.70.0080.01012.92
5.5.60.0080.01112.60
5.5.50.0100.00812.68
5.5.40.0100.00512.54
5.5.30.0100.00712.78
5.5.20.0120.00912.63
5.5.10.0140.00912.57
5.5.00.0150.00512.86
5.4.450.0160.01713.87
5.4.440.0210.02513.86
5.4.430.0170.02713.67
5.4.420.0180.02613.95
5.4.410.0170.01613.99
5.4.400.0160.03113.81
5.4.390.0180.02013.87
5.4.380.0140.02413.73
5.4.370.0210.02013.80
5.4.360.0130.02013.80
5.4.350.0130.02613.97
5.4.340.0180.02513.63
5.4.330.0080.00911.01
5.4.320.0130.02113.72
5.4.310.0130.02013.79
5.4.300.0160.01913.69
5.4.290.0210.01413.86
5.4.280.0120.01813.65
5.4.270.0180.01613.88
5.4.260.0190.02013.78
5.4.250.0170.02813.67
5.4.240.0180.02613.71
5.4.230.0160.01713.82
5.4.220.0170.01613.69
5.4.210.0170.02713.76
5.4.200.0200.01213.64
5.4.190.0130.02113.81
5.4.180.0120.01713.76
5.4.170.0200.01813.65
5.4.160.0180.02313.78
5.4.150.0150.02913.68
5.4.140.0110.02212.92
5.4.130.0180.01712.90
5.4.120.0170.02412.86
5.4.110.0180.02512.75
5.4.100.0130.02612.80
5.4.90.0140.02012.96
5.4.80.0150.02312.94
5.4.70.0150.01512.79
5.4.60.0120.01812.77
5.4.50.0160.02612.85
5.4.40.0170.02713.01
5.4.30.0160.02512.76
5.4.20.0160.02412.80
5.4.10.0120.02312.85
5.4.00.0150.02812.85
5.3.290.0180.01612.60
5.3.280.0150.01712.45
5.3.270.0120.01912.47
5.3.260.0170.03012.54
5.3.250.0170.02112.45
5.3.240.0200.02412.42
5.3.230.0150.01712.42
5.3.220.0120.03112.36
5.3.210.0220.01412.37
5.3.200.0090.02512.38
5.3.190.0160.02312.43
5.3.180.0150.01412.40
5.3.170.0130.02512.43
5.3.160.0180.01612.31
5.3.150.0140.02212.36
5.3.140.0120.01812.50
5.3.130.0180.01412.46
5.3.120.0210.01412.36
5.3.110.0170.01912.44
5.3.100.0160.02712.46
5.3.90.0160.02212.50
5.3.80.0160.02312.46
5.3.70.0180.02212.38
5.3.60.0150.01612.44
5.3.50.0150.01512.39
5.3.40.0110.03112.38
5.3.30.0190.01512.48
5.3.20.0130.02212.48
5.3.10.0150.01812.34
5.3.00.0110.01712.33

preferences:
37.01 ms | 401 KiB | 5 Q