3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { const OMG = 10; public function get($what) { return constant("self::" . $what); } } class Test2 { private $test; public function __construct(Test $test) { $this->test = $test; } public function testFunc() { var_dump($this->test->get("OMG")); } } $test = new Test(); $test2 = new Test2($test); var_dump($test2->testFunc());

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.00716.50
8.3.50.0070.00921.98
8.3.40.0150.00418.94
8.3.30.0070.00719.08
8.3.20.0070.00020.34
8.3.10.0000.00823.48
8.3.00.0060.00319.81
8.2.180.0120.00916.50
8.2.170.0170.00322.96
8.2.160.0070.00720.39
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0080.00021.04
8.2.110.0000.01019.16
8.2.100.0090.00318.03
8.2.90.0000.00819.22
8.2.80.0040.00417.97
8.2.70.0000.00817.50
8.2.60.0080.00017.91
8.2.50.0000.00818.07
8.2.40.0030.00618.16
8.2.30.0000.00718.24
8.2.20.0040.00417.69
8.2.10.0000.00718.04
8.2.00.0000.00717.75
8.1.280.0160.01025.92
8.1.270.0030.00623.92
8.1.260.0040.00426.35
8.1.250.0050.00228.09
8.1.240.0110.00017.48
8.1.230.0100.00019.00
8.1.220.0000.00817.74
8.1.210.0050.00318.77
8.1.200.0040.00417.35
8.1.190.0040.00417.13
8.1.180.0050.00318.10
8.1.170.0000.00818.43
8.1.160.0040.00421.88
8.1.150.0050.00318.80
8.1.140.0030.00517.27
8.1.130.0070.00017.77
8.1.120.0050.00317.41
8.1.110.0030.00317.41
8.1.100.0040.00417.30
8.1.90.0040.00417.30
8.1.80.0040.00417.26
8.1.70.0040.00417.41
8.1.60.0030.00517.50
8.1.50.0030.00617.42
8.1.40.0040.00417.42
8.1.30.0040.00417.66
8.1.20.0030.00617.67
8.1.10.0040.00417.58
8.1.00.0000.00817.53
8.0.300.0040.00418.77
8.0.290.0070.00016.75
8.0.280.0030.00318.45
8.0.270.0070.00017.28
8.0.260.0000.00617.26
8.0.250.0040.00416.94
8.0.240.0030.00617.09
8.0.230.0050.00316.90
8.0.220.0030.00316.86
8.0.210.0000.00716.92
8.0.200.0000.00816.99
8.0.190.0060.00317.06
8.0.180.0040.00417.06
8.0.170.0040.00417.01
8.0.160.0000.00716.92
8.0.150.0000.00716.86
8.0.140.0070.00016.83
8.0.130.0000.00513.37
8.0.120.0040.00416.81
8.0.110.0050.00316.94
8.0.100.0040.00416.82
8.0.90.0050.00216.72
8.0.80.0040.01816.88
8.0.70.0020.00516.68
8.0.60.0050.00216.73
8.0.50.0080.00016.91
8.0.30.0080.01417.10
8.0.20.0120.00917.40
8.0.10.0050.00316.84
8.0.00.0130.00416.63
7.4.330.0050.00015.00
7.4.320.0050.00216.55
7.4.300.0000.00616.52
7.4.290.0030.00316.52
7.4.280.0000.00716.59
7.4.270.0040.00416.51
7.4.260.0070.00316.39
7.4.250.0040.00416.46
7.4.240.0020.00516.60
7.4.230.0030.00316.63
7.4.220.0100.00916.65
7.4.210.0130.00716.55
7.4.200.0030.00316.59
7.4.160.0060.01016.35
7.4.150.0130.00317.40
7.4.140.0050.01317.86
7.4.130.0050.01216.46
7.4.120.0080.01216.69
7.4.110.0100.01016.41
7.4.100.0030.01416.64
7.4.90.0130.00316.60
7.4.80.0070.01619.39
7.4.70.0120.01216.46
7.4.60.0100.00716.44
7.4.50.0040.00416.52
7.4.40.0090.00616.46
7.4.30.0070.01516.43
7.4.00.0080.00815.07
7.3.330.0030.00413.25
7.3.320.0060.00013.05
7.3.310.0040.00416.10
7.3.300.0050.00316.07
7.3.290.0080.00816.26
7.3.280.0090.00916.22
7.3.270.0090.00817.40
7.3.260.0090.01216.48
7.3.250.0110.00716.30
7.3.240.0160.00016.48
7.3.230.0100.00716.39
7.3.210.0080.00816.27
7.3.200.0100.00719.39
7.3.190.0030.01316.35
7.3.180.0070.01316.27
7.3.170.0090.00616.38
7.3.160.0060.01216.48
7.3.120.0070.01114.71
7.3.110.0030.01014.99
7.3.100.0070.01014.47
7.3.90.0040.00414.50
7.3.80.0090.00614.77
7.3.70.0040.00714.84
7.3.60.0120.00314.86
7.3.50.0070.01114.72
7.3.40.0030.00814.77
7.3.30.0060.00614.55
7.3.20.0170.00016.44
7.3.10.0030.01216.34
7.3.00.0060.00916.50
7.2.330.0130.00716.84
7.2.320.0080.00816.45
7.2.310.0040.01716.41
7.2.300.0120.00916.72
7.2.290.0040.01216.74
7.2.250.0060.01214.81
7.2.240.0060.01214.84
7.2.230.0100.00714.86
7.2.220.0040.01114.84
7.2.210.0030.00914.62
7.2.200.0110.00315.02
7.2.190.0040.01615.16
7.2.180.0110.00414.93
7.2.170.0070.00315.08
7.2.00.0030.01019.32
7.1.330.0060.00615.74
7.1.320.0060.00915.63
7.1.310.0000.01215.93
7.1.300.0070.01015.89
7.1.290.0060.00315.46
7.1.280.0070.00715.88
7.1.270.0140.00315.86
7.1.260.0060.01015.77
7.1.100.0000.01217.86
7.1.70.0100.00016.86
7.1.60.0090.01619.70
7.1.50.0100.01316.69
7.1.00.0030.07722.45
7.0.200.0060.01116.70
7.0.140.0070.06722.15
7.0.60.0070.07720.00
7.0.50.0070.04717.96
7.0.40.0130.05720.11
7.0.30.0300.08020.15
7.0.20.0170.08320.21
7.0.10.0400.07320.07
7.0.00.0130.06020.07
5.6.210.0070.08720.62
5.6.200.0070.09018.12
5.6.190.0000.05720.39
5.6.180.0100.07720.48
5.6.170.0300.08320.67
5.6.160.0100.06320.52
5.6.150.0030.04018.12
5.6.140.0030.04018.28
5.6.130.0030.08318.28
5.6.120.0100.05021.00
5.6.110.0100.08321.14
5.6.100.0070.08321.08
5.6.90.0100.07321.02
5.6.80.0070.06320.36
5.6.70.4200.04020.40
5.5.350.0000.03320.48
5.5.340.0070.03718.05
5.5.330.0030.04320.13
5.5.320.0130.08720.27
5.5.310.0230.06020.34
5.5.300.0030.05318.04
5.5.290.0000.05318.05
5.5.280.0100.06720.80
5.5.270.0030.07020.88
5.5.260.0130.08020.98
5.5.250.0130.07320.62
5.5.240.0130.05020.19
5.4.450.0230.04719.41
5.4.440.0230.06319.30
5.4.430.0200.08019.27
5.4.420.0200.06719.46
5.4.410.0130.05319.14
5.4.400.0200.07319.07
5.4.390.0170.08019.21
5.4.380.0270.05319.31
5.4.370.0300.06719.06
5.4.360.0100.04319.30
5.4.350.0270.03318.84
5.4.340.0170.07719.09
5.4.320.0170.04018.83
5.4.310.0100.04718.95
5.4.300.0230.03718.94
5.4.290.0230.04719.09
5.4.280.0300.04719.08
5.4.270.0170.03719.30
5.4.260.0270.07018.95
5.4.250.0170.03718.86
5.4.240.0200.07718.88
5.4.230.0130.04319.18
5.4.220.0130.04719.15
5.4.210.0170.05718.86
5.4.200.0170.03719.07
5.4.190.0170.03719.14
5.4.180.0170.03719.05
5.4.170.0300.03718.85
5.4.160.0300.06718.82
5.4.150.0200.04019.17
5.4.140.0200.07316.36
5.4.130.0300.06016.54
5.4.120.0200.07016.38
5.4.110.0230.04316.32
5.4.100.0170.03316.47
5.4.90.0230.05316.63
5.4.80.0130.03716.49
5.4.70.0200.03016.59
5.4.60.0170.08016.55
5.4.50.0270.05016.33
5.4.40.0130.04316.34
5.4.30.0200.03316.37
5.4.20.0300.06716.41
5.4.10.0230.07316.42
5.4.00.0170.08015.95
5.3.290.0130.04314.75
5.3.280.0170.06314.65
5.3.270.0270.05714.77
5.3.260.0170.04714.75
5.3.250.0230.07014.54
5.3.240.0100.04714.76
5.3.230.0330.06314.68
5.3.220.0200.05014.48
5.3.210.0200.07714.57
5.3.200.0270.05714.62
5.3.190.0300.06314.57
5.3.180.0230.07014.48
5.3.170.0200.07314.68
5.3.160.0270.06314.68
5.3.150.0130.06714.64
5.3.140.0300.04314.56
5.3.130.0130.04714.77
5.3.120.0170.04714.77
5.3.110.0170.07314.64
5.3.100.0200.03714.05
5.3.90.0270.07014.09
5.3.80.0200.07713.93
5.3.70.0230.06014.25
5.3.60.0230.04313.93
5.3.50.0200.06714.10
5.3.40.0200.07713.86
5.3.30.0170.06713.85
5.3.20.0170.04713.60
5.3.10.0130.04013.66
5.3.00.0300.05013.55
5.2.170.0100.04011.08
5.2.160.0100.03311.07
5.2.150.0170.04711.07
5.2.140.0200.06011.07
5.2.130.0300.04711.23
5.2.120.0200.05311.19
5.2.110.0200.03711.02
5.2.100.0100.03311.19
5.2.90.0200.02311.12
5.2.80.0170.04011.03
5.2.70.0170.02711.11
5.2.60.0170.04710.98
5.2.50.0170.02711.25
5.2.40.0100.03710.91
5.2.30.0070.03311.03
5.2.20.0170.02311.11
5.2.10.0130.02710.83
5.2.00.0070.03310.64
5.1.60.0100.03010.13
5.1.50.0100.04010.01
5.1.40.0230.01710.21
5.1.30.0170.05710.27
5.1.20.0170.04710.31
5.1.10.0170.05310.24
5.1.00.0170.05310.15
5.0.50.0170.0338.56
5.0.40.0100.0208.40
5.0.30.0030.0338.39
5.0.20.0100.0138.33
5.0.10.0100.0178.27
5.0.00.0100.0338.07
4.4.90.0030.0177.50
4.4.80.0030.0207.50
4.4.70.0030.0177.50
4.4.60.0030.0177.50
4.4.50.0070.0137.50
4.4.40.0070.0237.50
4.4.30.0030.0177.50
4.4.20.0030.0177.50
4.4.10.0030.0177.50
4.4.00.0070.0237.50
4.3.110.0030.0177.50
4.3.100.0070.0137.50
4.3.90.0030.0177.50
4.3.80.0070.0277.50
4.3.70.0030.0177.50
4.3.60.0070.0137.50
4.3.50.0030.0177.50
4.3.40.0030.0337.50
4.3.30.0000.0207.50
4.3.20.0000.0207.50
4.3.10.0000.0177.50
4.3.00.0000.0177.50

preferences:
42.98 ms | 401 KiB | 5 Q