3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { public function publicMethod() { return function() { return $this->privateMethod(); }; } private function privateMethod() { return 'works'; } } $test = new Test; $testFunction = $test->publicMethod(); echo $testFunction();

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.28
8.3.50.0110.00522.04
8.3.40.0040.01118.67
8.3.30.0070.00719.04
8.3.20.0030.00320.39
8.3.10.0050.00323.48
8.3.00.0060.00320.70
8.2.180.0120.00316.50
8.2.170.0110.00322.96
8.2.160.0070.00720.39
8.2.150.0090.00624.18
8.2.140.0040.00424.66
8.2.130.0050.00226.16
8.2.120.0030.00519.36
8.2.110.0060.00321.00
8.2.100.0060.00617.71
8.2.90.0030.00517.91
8.2.80.0000.00818.03
8.2.70.0040.00417.50
8.2.60.0000.00817.63
8.2.50.0000.00817.93
8.2.40.0090.00019.35
8.2.30.0040.00418.23
8.2.20.0000.00817.74
8.2.10.0050.00317.96
8.2.00.0000.00919.53
8.1.280.0110.00425.92
8.1.270.0080.00022.14
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0090.00023.79
8.1.230.0080.00322.77
8.1.220.0040.00417.74
8.1.210.0060.00318.77
8.1.200.0050.00317.23
8.1.190.0030.00617.00
8.1.180.0030.00618.10
8.1.170.0030.00617.62
8.1.160.0000.00822.02
8.1.150.0030.00618.59
8.1.140.0050.00317.46
8.1.130.0000.00717.73
8.1.120.0060.00317.37
8.1.110.0000.00817.41
8.1.100.0040.00417.42
8.1.90.0000.00817.46
8.1.80.0000.00717.48
8.1.70.0020.00517.41
8.1.60.0090.00017.47
8.1.50.0040.00417.44
8.1.40.0040.00417.52
8.1.30.0030.00617.68
8.1.20.0000.00717.64
8.1.10.0040.00417.60
8.1.00.0000.00717.50
8.0.300.0000.00719.89
8.0.290.0000.00716.63
8.0.280.0030.00318.35
8.0.270.0030.00317.26
8.0.260.0060.00017.26
8.0.250.0000.00616.94
8.0.240.0060.00316.81
8.0.230.0030.00316.79
8.0.220.0030.00316.83
8.0.210.0040.00416.84
8.0.200.0060.00016.88
8.0.190.0000.00816.93
8.0.180.0060.00616.80
8.0.170.0040.00416.91
8.0.160.0020.00516.73
8.0.150.0030.00316.86
8.0.140.0050.00316.75
8.0.130.0000.00513.28
8.0.120.0030.00516.83
8.0.110.0040.00416.79
8.0.100.0080.00016.73
8.0.90.0000.00716.77
8.0.80.0120.00916.86
8.0.70.0030.00516.74
8.0.60.0000.00816.76
8.0.50.0050.00216.90
8.0.30.0110.00817.05
8.0.20.0080.01317.40
8.0.10.0030.00516.87
8.0.00.0070.01016.78
7.4.330.0020.00215.06
7.4.320.0030.00316.48
7.4.300.0030.00316.60
7.4.290.0070.00016.61
7.4.280.0000.00816.58
7.4.270.0030.00416.61
7.4.260.0120.00016.47
7.4.250.0030.00516.46
7.4.240.0050.00216.56
7.4.230.0000.00716.60
7.4.220.0070.01016.68
7.4.210.0060.01316.68
7.4.200.0070.00016.48
7.4.160.0080.00816.48
7.4.150.0070.01017.40
7.4.140.0100.00617.86
7.4.130.0110.00816.45
7.4.120.0120.00716.51
7.4.110.0040.01416.54
7.4.100.0060.01216.57
7.4.90.0070.01016.50
7.4.80.0050.01419.39
7.4.70.0080.00816.50
7.4.60.0030.01416.54
7.4.50.0060.00316.20
7.4.40.0100.00716.61
7.4.30.0040.01716.27
7.4.00.0090.00615.05
7.3.330.0000.00713.23
7.3.320.0030.00313.32
7.3.310.0040.00416.35
7.3.300.0000.00716.31
7.3.290.0070.00716.32
7.3.280.0080.01116.26
7.3.270.0030.01617.40
7.3.260.0120.00616.29
7.3.250.0120.00816.24
7.3.240.0000.01716.51
7.3.230.0030.01316.55
7.3.210.0060.01116.39
7.3.200.0090.00619.39
7.3.190.0090.00916.21
7.3.180.0040.01116.23
7.3.170.0110.00516.38
7.3.160.0070.01016.47
7.3.120.0000.00914.70
7.2.330.0070.01016.66
7.2.320.0140.00616.80
7.2.310.0130.00316.53
7.2.300.0050.01116.69
7.2.290.0120.01116.84
7.2.00.0040.01119.51
7.1.200.0030.00715.41
7.1.100.0090.00418.12
7.1.70.0120.00317.07
7.1.60.0030.01019.70
7.1.50.0070.01316.80
7.1.00.0000.07722.35
7.0.200.0060.00316.82
7.0.140.0070.07022.18
7.0.60.0030.08320.07
7.0.50.0030.08017.85
7.0.40.0130.07320.40
7.0.30.0170.06020.08
7.0.20.0370.07020.12
7.0.10.0170.04020.12
7.0.00.0100.08020.11
5.6.280.0070.07021.09
5.6.210.0030.06720.47
5.6.200.0000.05718.16
5.6.190.0170.08020.46
5.6.180.0200.06020.52
5.6.170.0270.08020.48
5.6.160.0130.07720.41
5.6.150.0030.08018.20
5.6.140.0070.08318.28
5.6.130.0070.08018.18
5.6.120.0030.07721.02
5.6.110.0100.06321.02
5.6.100.0070.08021.15
5.6.90.0170.06320.89
5.6.80.0070.08320.30
5.5.350.0200.08320.48
5.5.340.0070.06018.01
5.5.330.0130.05020.38
5.5.320.0230.04320.28
5.5.310.0470.06720.34
5.5.300.0100.08017.94
5.5.290.0030.04017.97
5.5.280.0070.06720.74
5.5.270.0070.04020.98
5.5.260.0070.08320.88
5.5.250.0170.07320.66
5.5.240.0100.06320.16
5.4.450.0230.05019.20
5.4.440.0200.04019.46
5.4.430.0200.07719.19
5.4.420.0200.08319.41
5.4.410.0200.06319.36
5.4.400.0270.06318.87
5.4.390.0270.05719.16
5.4.380.0230.07019.06
5.4.370.0200.05318.95
5.4.360.0170.07719.21
5.4.350.0230.04719.22
5.4.340.0270.06719.22
5.4.320.0230.07319.00
5.4.310.0300.05719.11
5.4.300.0270.07019.15
5.4.290.0300.06319.00
5.4.280.0330.06319.08
5.4.270.0330.06018.87
5.4.260.0230.07019.24
5.4.250.0330.06318.84
5.4.240.0170.05318.94
5.4.230.0170.04319.13
5.4.220.0270.06018.84
5.4.210.0270.07319.07
5.4.200.0230.06018.94
5.4.190.0270.06019.07
5.4.180.0270.06319.05
5.4.170.0200.07018.93
5.4.160.0200.07319.30
5.4.150.0230.07718.93
5.4.140.0400.05016.55
5.4.130.0200.07316.56
5.4.120.0300.04016.54
5.4.110.0230.05716.59
5.4.100.0300.06716.41
5.4.90.0170.04016.33
5.4.80.0330.06016.38
5.4.70.0200.06016.49
5.4.60.0130.07016.26
5.4.50.0270.06016.42
5.4.40.0230.04716.25
5.4.30.0200.04016.50
5.4.20.0200.04316.42
5.4.10.0200.05716.42
5.4.00.0170.05015.78
5.3.290.0270.06714.78
5.3.280.0170.04014.76
5.3.270.0200.06014.51
5.3.260.0270.05714.77
5.3.250.0230.06714.61
5.3.240.0230.06714.52
5.3.230.0230.07014.64
5.3.220.0170.07714.56
5.3.210.0200.06314.64
5.3.200.0200.07014.49
5.3.190.0230.07714.54
5.3.180.0200.05014.48
5.3.170.0300.05014.49
5.3.160.0200.03714.54
5.3.150.0270.07314.57
5.3.140.0230.03314.63
5.3.130.0170.04014.56
5.3.120.0270.06714.56
5.3.110.0130.04714.45
5.3.100.0270.04014.16
5.3.90.0200.07313.93
5.3.80.0170.07314.25
5.3.70.0170.05314.12
5.3.60.0200.07314.17
5.3.50.0130.04713.96
5.3.40.0200.06313.95
5.3.30.0200.04313.89
5.3.20.0300.06313.71
5.3.10.0270.06313.61
5.3.00.0200.05713.57
5.2.170.0130.04312.16
5.2.160.0130.04012.16
5.2.150.0170.05312.16
5.2.140.0200.05712.16
5.2.130.0200.06012.16
5.2.120.0130.06712.16
5.2.110.0230.04012.16
5.2.100.0170.05312.16
5.2.90.0230.04312.16
5.2.80.0230.03312.16
5.2.70.0130.05712.16
5.2.60.0270.05012.16
5.2.50.0170.04712.16
5.2.40.0200.05712.16
5.2.30.0130.06012.16
5.2.20.0170.06312.16
5.2.10.0170.05712.16
5.2.00.0230.05012.16
5.1.60.0170.04012.16
5.1.50.0200.05012.16
5.1.40.0230.04712.16
5.1.30.0070.04712.16
5.1.20.0100.04312.16
5.1.10.0200.05012.16
5.1.00.0200.03312.16
5.0.50.0200.03012.16
5.0.40.0100.03712.16
5.0.30.0070.07012.16
5.0.20.0100.04012.16
5.0.10.0130.04012.16
5.0.00.0100.06012.16
4.4.90.0030.04012.16
4.4.80.0100.03712.16
4.4.70.0070.03712.16
4.4.60.0070.03712.16
4.4.50.0070.02312.16
4.4.40.0100.04012.16
4.4.30.0070.03712.16
4.4.20.0030.04012.16
4.4.10.0100.03712.16
4.4.00.0030.04312.16
4.3.110.0130.03312.16
4.3.100.0100.03012.16
4.3.90.0100.03312.16
4.3.80.0070.03012.16
4.3.70.0100.02012.16
4.3.60.0070.03712.16
4.3.50.0070.03312.16
4.3.40.0100.05012.16
4.3.30.0070.03712.16
4.3.20.0030.03012.16
4.3.10.0130.02712.16
4.3.00.0100.01712.16

preferences:
46.85 ms | 401 KiB | 5 Q