3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { protected $var; function initClass() { $this->var = __CLASS__; } function getVar() { assert($this->var !== null); // ensure initClass was called return $this->var; } } class bar extends foo { function initClass() { $this->var = __CLASS__; } } $bar = new bar; call_user_func([$bar, "parent::initClass"]); var_dump($bar->getVar());

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.01016.63
8.3.50.0140.00721.11
8.3.40.0110.01418.77
8.3.30.0070.00718.85
8.3.20.0040.00420.24
8.3.10.0000.00721.77
8.3.00.0080.00017.50
8.2.180.0040.01116.50
8.2.170.0090.00922.96
8.2.160.0120.00620.55
8.2.150.0070.00024.18
8.2.140.0080.00024.66
8.2.130.0000.00726.16
8.2.120.0040.00419.24
8.2.110.0000.00921.11
8.2.100.0070.00717.78
8.2.90.0030.00618.03
8.2.80.0040.00417.97
8.2.70.0050.00317.63
8.2.60.0030.00618.03
8.2.50.0000.00818.07
8.2.40.0060.00319.82
8.2.30.0000.00718.02
8.2.20.0040.00417.67
8.2.10.0000.00817.99
8.2.00.0040.00418.11
8.1.280.0140.00325.92
8.1.270.0060.00320.20
8.1.260.0090.00026.35
8.1.250.0040.00428.09
8.1.240.0030.00622.57
8.1.230.0040.00720.91
8.1.220.0090.00017.74
8.1.210.0040.00418.87
8.1.200.0030.00617.36
8.1.190.0060.00317.35
8.1.180.0000.00918.10
8.1.170.0000.00820.44
8.1.160.0040.00421.89
8.1.150.0000.00718.79
8.1.140.0050.00317.38
8.1.130.0090.00017.82
8.1.120.0070.00017.45
8.1.110.0000.00717.39
8.1.100.0070.00017.36
8.1.90.0040.00417.34
8.1.80.0040.00417.41
8.1.70.0040.00417.34
8.1.60.0030.00517.60
8.1.50.0040.00417.51
8.1.40.0060.00317.43
8.1.30.0040.00417.59
8.1.20.0000.00817.59
8.1.10.0000.00817.45
8.1.00.0040.00417.50
8.0.300.0000.00720.02
8.0.290.0000.00716.62
8.0.280.0070.00018.44
8.0.270.0000.00717.16
8.0.260.0000.00817.24
8.0.250.0000.00716.87
8.0.240.0030.00716.98
8.0.230.0040.00416.95
8.0.220.0030.00316.77
8.0.210.0030.00316.91
8.0.200.0000.00616.94
8.0.190.0070.00316.95
8.0.180.0000.00816.91
8.0.170.0000.00916.84
8.0.160.0030.00316.95
8.0.150.0020.00516.88
8.0.140.0000.00816.97
8.0.130.0050.00013.33
8.0.120.0030.00516.94
8.0.110.0030.00617.02
8.0.100.0070.00017.02
8.0.90.0000.00917.06
8.0.80.0130.01016.99
8.0.70.0040.00416.85
8.0.60.0080.00016.85
8.0.50.0040.00416.95
8.0.30.0080.01616.81
8.0.20.0150.00317.40
8.0.10.0040.00417.14
8.0.00.0090.00816.75
7.4.330.0030.00315.03
7.4.320.0000.00716.51
7.4.300.0060.00016.56
7.4.290.0000.01016.36
7.4.280.0040.00416.39
7.4.270.0030.00316.56
7.4.260.0000.00816.60
7.4.250.0030.00516.46
7.4.240.0020.00516.56
7.4.230.0070.00016.60
7.4.220.0070.01316.61
7.4.210.0030.01116.48
7.4.200.0000.00716.34
7.4.160.0060.00916.34
7.4.150.0120.00617.40
7.4.140.0140.01017.86
7.4.130.0060.00316.47
7.4.120.0060.01116.52
7.4.110.0120.00616.58
7.4.100.0030.02316.37
7.4.90.0040.01416.36
7.4.80.0160.00819.39
7.4.70.0080.01116.39
7.4.60.0090.00616.50
7.4.50.0030.00516.42
7.4.40.0030.01316.27
7.4.30.0100.01016.38
7.4.00.0070.00715.05
7.3.330.0020.00213.18
7.3.320.0030.00913.16
7.3.310.0050.00316.25
7.3.300.0070.00016.23
7.3.290.0090.00816.31
7.3.280.0060.00916.35
7.3.270.0150.00917.40
7.3.260.0100.00716.56
7.3.250.0090.00816.34
7.3.240.0100.00616.43
7.3.230.0110.00716.39
7.3.210.0170.00016.55
7.3.200.0030.01219.39
7.3.190.0060.00916.44
7.3.180.0100.00716.30
7.3.170.0100.00616.40
7.3.160.0060.01016.48
7.3.10.0060.00916.52
7.3.00.0100.00516.61
7.2.330.0060.01216.53
7.2.320.0100.00716.50
7.2.310.0100.00716.60
7.2.300.0090.00916.77
7.2.290.0100.00716.58
7.2.130.0090.00816.79
7.2.120.0070.00816.71
7.2.110.0080.00516.73
7.2.100.0050.01016.76
7.2.90.0070.01016.84
7.2.80.0030.01016.74
7.2.70.0050.01016.92
7.2.60.0050.01016.71
7.2.50.0050.01116.69
7.2.40.0080.00916.88
7.2.30.0060.00916.64
7.2.20.0090.00716.78
7.2.10.0120.01016.82
7.2.00.0050.00816.78
7.1.250.0080.00815.56
7.1.200.0280.00515.18
7.1.70.0110.00017.14
7.1.60.0060.00619.50
7.1.50.0060.01916.63
7.1.00.0070.07322.28
7.0.200.0460.00414.57
7.0.60.0130.08020.07
7.0.50.0030.08317.80
7.0.40.0070.04720.23
7.0.30.0230.07720.18
7.0.20.0200.07020.22
7.0.10.0170.04320.21
7.0.00.0100.08320.07
5.6.280.0000.07721.13
5.6.210.0130.07720.71
5.6.200.0100.08018.14
5.6.190.0100.04320.64
5.6.180.3600.04320.52
5.6.170.0230.04020.45
5.6.160.0130.07320.52
5.6.150.0000.04318.29
5.6.140.0070.08018.18
5.6.130.0100.05718.17
5.6.120.0130.07720.98
5.6.110.0030.07321.01
5.6.100.0030.08320.99
5.6.90.0030.08320.98
5.6.80.0070.08020.41
5.6.70.3870.04320.35
5.5.350.0270.07720.34
5.5.340.0130.06317.99
5.5.330.0070.05720.31
5.5.320.0400.07320.52
5.5.310.0200.08020.34
5.5.300.0070.07317.99
5.5.290.0070.04718.07
5.5.280.0130.07720.81
5.5.270.0100.08020.87
5.5.260.0170.08020.76
5.5.250.0000.05320.80
5.5.240.0070.07720.19
5.4.450.0900.03319.51
5.4.440.0900.05719.47
5.4.430.0800.04319.28
5.4.420.0970.07319.22
5.4.410.0100.05718.99
5.4.400.0270.06318.73
5.4.390.0600.04018.75
5.4.380.2330.07018.61
5.4.370.0230.05318.78
5.4.360.3500.05318.59
5.4.350.0270.06718.73
5.4.340.0200.08318.75
5.4.320.0330.08018.50
5.4.310.0870.05718.71
5.4.300.0170.06718.63
5.4.290.0770.06018.56
5.4.280.0300.07318.50
5.4.270.0230.06718.62
5.4.260.0530.04318.77
5.4.250.0400.06018.69
5.4.240.0230.06318.74
5.4.230.0570.06018.73
5.4.220.0400.07718.61
5.4.210.0470.06018.77
5.4.200.0400.06016.50
5.4.190.0500.05318.51
5.4.180.0300.07318.55
5.4.170.0670.05718.49
5.4.160.0400.05718.82
5.4.150.0530.05018.68
5.4.140.0600.06016.37
5.4.130.0470.05016.45
5.4.120.0370.04716.35
5.4.110.0500.05316.27
5.4.100.0500.05716.25
5.4.90.0570.05316.36
5.4.80.0600.06016.35
5.4.70.0570.06316.29
5.4.60.0530.05316.15
5.4.50.0430.04716.18
5.4.40.0430.05716.30
5.4.30.0530.05716.16
5.4.20.0470.06316.47
5.4.10.0370.07016.20
5.4.00.0370.05715.65
5.3.290.0370.07014.67
5.3.280.0370.07314.77
5.3.270.0500.06714.64
5.3.260.0300.06714.75
5.3.250.0330.06714.82
5.3.240.0500.05714.66
5.3.230.2830.06014.77
5.3.220.0530.07314.70
5.3.210.0500.05714.79
5.3.200.0700.06314.78
5.3.190.0430.06014.61
5.3.180.0470.06314.60
5.3.170.0230.06314.67
5.3.160.0330.04714.71
5.3.150.0470.07714.62
5.3.140.2570.07714.55
5.3.130.0370.07714.61
5.3.120.0430.05714.55
5.3.110.0270.07714.60
5.3.100.0430.04714.23
5.3.90.2370.07014.07
5.3.80.0230.05014.10
5.3.70.0300.05714.14
5.3.60.2070.05014.21
5.3.50.0470.04713.98
5.3.40.0370.06313.98
5.3.30.0230.05013.96
5.3.20.0370.06013.70
5.3.10.0270.05013.77
5.3.00.0430.04013.69
5.2.170.1970.04011.23
5.2.160.0370.04311.19
5.2.150.0370.05311.38
5.2.140.0300.05011.20
5.2.130.0200.04011.15
5.2.120.1570.04011.14
5.2.110.0270.04311.16
5.2.100.0330.06311.21
5.2.90.0330.06011.32
5.2.80.0230.06711.21
5.2.70.0130.04311.23
5.2.60.0330.04011.26
5.2.50.0270.05011.12
5.2.40.0300.03711.12
5.2.30.1970.06011.01
5.2.20.0400.05310.98
5.2.10.2500.05010.86
5.2.00.0500.03710.77
5.1.60.0170.04010.21
5.1.50.0300.04710.04
5.1.40.0370.05010.01
5.1.30.0370.04010.52
5.1.20.0200.03310.36
5.1.10.0330.04010.16
5.1.00.0230.03310.19
5.0.50.0070.0378.63
5.0.40.0170.0208.43
5.0.30.0230.0478.36
5.0.20.0130.0238.27
5.0.10.0070.0308.16
5.0.00.0400.0408.21
4.4.90.0070.0305.87
4.4.80.0230.0205.98
4.4.70.0130.0205.91
4.4.60.0130.0305.93
4.4.50.0130.0205.89
4.4.40.0030.0505.89
4.4.30.0030.0235.89
4.4.20.0130.0205.99
4.4.10.0200.0175.93
4.4.00.0100.0375.95
4.3.110.0070.0275.80
4.3.100.0230.0175.80
4.3.90.0130.0335.86
4.3.80.0200.0305.78
4.3.70.0070.0305.87
4.3.60.0100.0275.76
4.3.50.0130.0275.78
4.3.40.0130.0405.84
4.3.30.2700.0274.61
4.3.20.0100.0204.64
4.3.10.0100.0274.57
4.3.00.0030.01714.57

preferences:
53.18 ms | 401 KiB | 5 Q