3v4l.org

run code in 300+ PHP versions simultaneously
<?php abstract class ParentP { abstract public function doMaths($num); //returns int public function getMagicNumber() { return 50; } } class IMultiply extends ParentP { public function doMaths($num) { echo static::getMagicNumber() * $num; } } class IAdd extends ParentP { public function doMaths($num) { echo $this->getMagicNumber() + $number; } } $a = new IMultiply; $a->doMaths(2);

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.00718.18
8.3.50.0050.01222.16
8.3.40.0080.01118.52
8.3.30.0070.00719.10
8.3.20.0040.00420.22
8.3.10.0040.00420.36
8.3.00.0080.00020.80
8.2.180.0150.00016.38
8.2.170.0170.00422.96
8.2.160.0140.00420.52
8.2.150.0080.00024.18
8.2.140.0000.00824.66
8.2.130.0000.00726.16
8.2.120.0050.00319.38
8.2.110.0070.00322.05
8.2.100.0080.00420.34
8.2.90.0000.00817.78
8.2.80.0050.00219.46
8.2.70.0050.00318.04
8.2.60.0080.00018.03
8.2.50.0000.00818.10
8.2.40.0030.00618.19
8.2.30.0040.00419.39
8.2.20.0000.00817.59
8.2.10.0050.00217.96
8.2.00.0040.00417.64
8.1.280.0160.00025.92
8.1.270.0080.00023.79
8.1.260.0040.00426.35
8.1.250.0070.00728.09
8.1.240.0030.00622.04
8.1.230.0040.00719.16
8.1.220.0050.00317.74
8.1.210.0030.00618.77
8.1.200.0080.00017.48
8.1.190.0060.00317.13
8.1.180.0080.00018.10
8.1.170.0000.00818.65
8.1.160.0070.00018.82
8.1.150.0000.00718.82
8.1.140.0020.00517.42
8.1.130.0000.00717.70
8.1.120.0040.00317.43
8.1.110.0060.00317.38
8.1.100.0000.00717.38
8.1.90.0070.00017.25
8.1.80.0000.00717.31
8.1.70.0070.00017.23
8.1.60.0040.00417.56
8.1.50.0040.00417.56
8.1.40.0060.00317.38
8.1.30.0000.00817.69
8.1.20.0030.00517.47
8.1.10.0000.00717.43
8.1.00.0100.00017.53
8.0.300.0060.00319.62
8.0.290.0000.00716.63
8.0.280.0000.00718.39
8.0.270.0030.00317.36
8.0.260.0060.00317.13
8.0.250.0030.00316.95
8.0.240.0030.00316.85
8.0.230.0000.00816.90
8.0.220.0000.00716.80
8.0.210.0050.00216.86
8.0.200.0030.00316.88
8.0.190.0080.00416.80
8.0.180.0020.00516.86
8.0.170.0060.00316.89
8.0.160.0000.00716.86
8.0.150.0090.00416.79
8.0.140.0000.00916.71
8.0.130.0040.00413.24
8.0.120.0040.00416.80
8.0.110.0000.00716.84
8.0.100.0040.00416.77
8.0.90.0050.00216.94
8.0.80.0000.01616.82
8.0.70.0000.00816.84
8.0.60.0020.00516.83
8.0.50.0050.00316.77
8.0.30.0080.01217.10
8.0.20.0090.00917.40
8.0.10.0000.00716.99
8.0.00.0110.00616.96
7.4.330.0030.00315.02
7.4.320.0030.00316.58
7.4.300.0030.00316.37
7.4.290.0080.00016.40
7.4.280.0040.00416.49
7.4.270.0030.00316.49
7.4.260.0030.00516.40
7.4.250.0020.00516.61
7.4.240.0020.00516.58
7.4.230.0030.00316.35
7.4.220.0060.01216.66
7.4.210.0090.01316.48
7.4.200.0000.00716.62
7.4.160.0080.01116.34
7.4.150.0120.00617.40
7.4.140.0100.01317.86
7.4.130.0070.00916.56
7.4.120.0140.01016.59
7.4.110.0130.00616.57
7.4.100.0060.00916.61
7.4.90.0120.00616.65
7.4.80.0130.00919.39
7.4.70.0090.00916.66
7.4.60.0080.00816.36
7.4.50.0060.00316.14
7.4.40.0030.01316.27
7.4.30.0110.00616.70
7.4.00.0030.01414.66
7.3.330.0020.00213.11
7.3.320.0000.00513.21
7.3.310.0070.00016.14
7.3.300.0030.00316.21
7.3.290.0100.00416.23
7.3.280.0110.00916.25
7.3.270.0030.01717.40
7.3.260.0070.01016.26
7.3.250.0080.00916.25
7.3.240.0130.00816.61
7.3.230.0070.02016.39
7.3.210.0180.00616.58
7.3.200.0150.00619.39
7.3.190.0100.00716.38
7.3.180.0130.00716.24
7.3.170.0100.00716.39
7.3.160.0070.01016.18
7.2.330.0080.01316.71
7.2.320.0070.02016.63
7.2.310.0110.01116.52
7.2.300.0030.01316.49
7.2.290.0030.01716.59
7.2.00.0090.00319.14
7.1.100.0030.00618.15
7.1.70.0000.00717.11
7.1.60.0070.01519.34
7.1.50.0130.00316.83
7.1.00.0070.07322.32
7.0.200.0130.00316.76
7.0.140.0030.05322.09
7.0.60.0200.05019.94
7.0.50.0100.07317.87
7.0.40.0070.04720.23
7.0.30.0400.07020.17
7.0.20.0230.04320.12
7.0.10.0070.07720.18
7.0.00.0030.04320.30
5.6.280.0100.06721.11
5.6.210.0100.03320.73
5.6.200.0070.04718.15
5.6.190.0130.04320.46
5.6.180.4130.03320.47
5.6.170.0300.07720.47
5.6.160.0130.04320.61
5.6.150.0070.07018.11
5.6.140.0130.07318.30
5.6.130.0070.08018.16
5.6.120.0070.08020.99
5.6.110.0070.08321.09
5.6.100.0070.06020.99
5.6.90.0100.05721.14
5.6.80.0030.04320.53
5.6.70.4230.04020.50
5.5.350.0100.04020.47
5.5.340.0070.07018.04
5.5.330.0100.07020.26
5.5.320.0170.04320.56
5.5.310.0230.08720.25
5.5.300.0030.04718.08
5.5.290.0000.04317.95
5.5.280.0070.06320.79
5.5.270.0070.05720.65
5.5.260.0030.07320.64
5.5.250.0000.05720.47
5.5.240.0130.03320.24
5.4.450.0600.05019.55
5.4.440.0370.03025.94
5.4.430.0500.04725.94
5.4.420.0070.06019.51
5.4.410.0170.05019.04
5.4.400.0100.05718.89
5.4.390.0130.06318.79
5.4.380.0170.04718.75
5.4.370.0130.06318.56
5.4.360.0100.05318.78
5.4.350.0000.05713.74
5.4.340.0000.05313.86
5.4.320.0100.04714.51
5.4.310.0070.04314.26
5.4.300.0070.04714.27
5.4.290.0100.04014.26
5.4.280.0070.04014.09
5.4.270.0070.03714.19
5.4.260.0170.04014.16
5.4.250.0100.05014.23
5.4.240.0070.04314.17
5.4.230.0070.04314.09
5.4.220.0130.04014.11
5.4.210.0130.04014.18
5.4.200.0170.05314.23
5.4.190.0130.04714.23
5.4.180.0200.03714.27
5.4.170.0130.04714.11
5.4.160.0070.04014.10
5.4.150.0000.05014.09
5.4.140.0070.04313.77
5.4.130.0030.04013.76
5.4.120.0030.04713.76
5.4.110.0070.03713.71
5.4.100.0100.03714.01
5.4.90.0070.04713.73
5.4.80.0070.03713.77
5.4.70.0130.04313.89
5.4.60.0030.04013.93
5.4.50.0130.04013.77
5.4.40.0130.04013.88
5.4.30.0130.04713.82
5.4.20.0170.04013.77
5.4.10.0100.03313.69
5.4.00.0100.03313.25
5.3.290.0070.04714.85
5.3.280.0130.04714.64
5.3.270.0170.04714.53
5.3.260.0100.04014.72
5.3.250.0070.04714.70
5.3.240.0070.04314.68
5.3.230.0030.05314.54
5.3.220.0170.05314.55
5.3.210.0130.05014.55
5.3.200.0130.05714.76
5.3.190.0100.05014.57
5.3.180.0070.05314.54
5.3.170.0230.04714.54
5.3.160.0130.05314.57
5.3.150.0070.04314.68
5.3.140.0100.04314.75
5.3.130.0070.04014.62
5.3.120.0070.04014.50
5.3.110.0130.03714.62
5.3.100.0030.04014.06
5.3.90.0100.03314.16
5.3.80.0070.04314.09
5.3.70.0130.04314.02
5.3.60.0130.03314.03
5.3.50.0100.03714.10
5.3.40.0070.04014.01
5.3.30.0000.04013.85
5.3.20.0100.03713.84
5.3.10.0100.03313.63
5.3.00.0070.03713.72
5.2.170.0030.03711.31
5.2.160.0000.03711.14
5.2.150.0000.03711.20
5.2.140.0070.03011.22
5.2.130.0030.03311.19
5.2.120.0030.03011.04
5.2.110.0170.02311.10
5.2.100.0070.03011.15
5.2.90.0100.03711.18
5.2.80.0030.03311.22
5.2.70.0100.03011.24
5.2.60.0070.03711.10
5.2.50.0030.03311.15
5.2.40.0070.03010.93
5.2.30.0000.03311.09
5.2.20.0070.02710.89
5.2.10.0070.03710.84
5.2.00.0070.03010.75
5.1.60.0130.02310.13
5.1.50.0000.0339.98
5.1.40.0070.02310.01
5.1.30.0070.03010.32
5.1.20.0030.03710.42
5.1.10.0070.02710.04
5.1.00.0070.02710.21
5.0.50.0070.0178.62
5.0.40.0030.0208.50
5.0.30.0030.0308.15
5.0.20.0000.0278.23
5.0.10.0100.0138.16
5.0.00.0000.0338.11
4.4.90.0030.0175.85
4.4.80.0000.0235.80
4.4.70.0000.0175.80
4.4.60.0000.0175.85
4.4.50.0000.0205.85
4.4.40.0030.0275.82
4.4.30.0000.0175.80
4.4.20.0030.0175.98
4.4.10.0000.0205.89
4.4.00.0000.0275.88
4.3.110.0030.0135.75
4.3.100.0030.0135.75
4.3.90.0070.0105.73
4.3.80.0000.0275.79
4.3.70.0030.0135.71
4.3.60.0070.0105.84
4.3.50.0100.0135.74
4.3.40.0070.0235.69
4.3.30.0030.0174.52
4.3.20.0030.0174.49
4.3.10.0000.0174.46
4.3.00.0070.01325.94

preferences:
50.87 ms | 401 KiB | 5 Q