3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Example { public function test ($param) { $closure = function ($whatever) { return $this; }; return $closure($param); } public function test2 ($param) { $closure = function($this) { return $this; }; return $closure($param); } } $ex = new Example; $not_masked = $ex->test('foo'); $masked = $ex->test2('foo'); var_dump($not_masked, $masked);

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.80.0070.00416.48
8.3.70.0210.00616.10
8.3.60.0180.01116.13
8.3.50.0070.00718.31
8.3.40.0200.00317.00
8.3.30.0180.00416.88
8.3.20.0220.00019.09
8.3.10.0130.01017.25
8.3.00.0180.00317.13
8.2.200.0220.00316.25
8.2.190.0140.01016.13
8.2.180.0160.00616.13
8.2.170.0250.00017.50
8.2.160.0140.00917.13
8.2.150.0260.00017.38
8.2.140.0190.00617.00
8.2.130.0210.00317.25
8.2.120.0180.00617.13
8.2.110.0200.00317.24
8.2.100.0180.00417.00
8.2.90.0170.00817.23
8.2.80.0220.00017.00
8.2.70.0150.00917.00
8.2.60.0190.00517.00
8.2.50.0190.00516.87
8.2.40.0190.00316.88
8.2.30.0160.00617.12
8.2.20.0150.00817.13
8.2.10.0090.01317.25
8.2.00.0060.01717.12
8.1.290.0120.01215.87
8.1.280.0240.00016.00
8.1.270.0230.00317.13
8.1.260.0210.00317.25
8.1.250.0180.00917.00
8.1.240.0170.00316.75
8.1.230.0160.00516.73
8.1.220.0180.00316.97
8.1.210.0140.00917.00
8.1.200.0130.00817.09
8.1.190.0130.00816.88
8.1.180.0180.00516.86
8.1.170.0150.00816.88
8.1.160.0150.00616.98
8.1.150.0130.00917.13
8.1.140.0170.00616.75
8.1.130.0150.00517.74
8.1.120.0140.00617.74
8.1.110.0120.00717.67
8.1.100.0090.00517.80
8.1.90.0120.00317.79
8.1.80.0090.00717.80
8.1.70.0080.00617.94
8.1.60.0100.00717.65
8.1.50.0140.00217.71
8.1.40.0100.00617.77
8.1.30.0110.00617.80
8.1.20.0080.00817.70
8.1.10.0130.00317.66
8.1.00.0110.00417.58
8.0.300.0150.00616.38
8.0.290.0190.00316.38
8.0.280.0170.00316.50
8.0.270.0180.00516.50
8.0.260.0120.00617.01
8.0.250.0090.01017.31
8.0.240.0150.00217.25
8.0.230.0140.00317.14
8.0.220.0130.00317.08
8.0.210.0060.00917.07
8.0.200.0120.00417.17
8.0.190.0130.00316.98
8.0.180.0120.00516.98
8.0.170.0140.00517.06
8.0.160.0150.00316.99
8.0.150.0140.00316.96
8.0.140.0130.00517.01
8.0.130.0110.00616.98
8.0.120.0120.00416.96
8.0.110.0100.00517.55
8.0.100.0090.00617.07
8.0.90.0140.00116.98
8.0.80.0100.00617.01
8.0.70.0110.00717.00
8.0.60.0140.00217.00
8.0.50.0130.00416.95
8.0.30.0140.00517.00
8.0.20.0100.00717.00
8.0.10.0110.00617.08
8.0.00.0050.00517.13
7.4.330.0090.00415.71
7.4.320.0120.00716.81
7.4.300.0160.00116.65
7.4.290.0120.00716.58
7.4.280.0130.00516.60
7.4.270.0160.00216.62
7.4.260.0100.00816.74
7.4.250.0110.00717.26
7.4.240.0120.00516.57
7.4.230.0150.00316.55
7.4.220.0120.00516.70
7.4.210.0140.00316.74
7.4.200.0080.00816.57
7.4.190.0110.00516.62
7.4.180.0120.00416.61
7.4.160.0110.00516.67
7.4.150.0120.00316.60
7.4.140.0130.00316.49
7.4.130.0070.00916.50
7.4.120.0140.00317.16
7.4.110.0080.00716.43
7.4.100.0120.00316.49
7.4.90.0090.00716.46
7.4.80.0130.00316.44
7.4.70.0110.00516.37
7.4.60.0120.00516.48
7.4.50.0120.00316.43
7.4.40.0160.00016.36
7.4.30.0120.00316.50
7.4.20.0120.00416.95
7.4.10.0130.00216.46
7.4.00.0120.00316.48
7.3.330.0140.00216.37
7.3.320.0110.00616.42
7.3.310.0100.00616.38
7.3.300.0160.00016.30
7.3.290.0110.00516.37
7.3.280.0120.00416.42
7.3.270.0120.00316.54
7.3.260.0110.00516.42
7.3.250.0140.00216.44
7.3.240.0140.00116.43
7.3.230.0120.00416.37
7.3.220.0130.00316.33
7.3.210.0110.00516.34
7.3.200.0110.00616.17
7.3.190.0110.00516.33
7.3.180.0120.00416.37
7.3.170.0080.00716.30
7.3.160.0130.00316.35
7.3.150.0130.00316.40
7.3.140.0100.00616.28
7.3.130.0120.00416.35
7.3.120.0130.00316.34
7.3.110.0140.00316.33
7.3.100.0120.00416.13
7.3.90.0120.00316.60
7.3.80.0120.00416.35
7.3.70.0140.00316.43
7.3.60.0110.00516.45
7.3.50.0120.00416.40
7.3.40.0080.00816.57
7.3.30.0120.00315.83
7.3.20.0370.00617.30
7.3.10.0370.00417.26
7.3.00.0300.00417.34
7.2.340.0110.00516.38
7.2.330.0140.00216.40
7.2.320.0100.00716.29
7.2.310.0100.00617.01
7.2.300.0130.00416.54
7.2.290.0150.00116.41
7.2.280.0110.00416.25
7.2.270.0130.00316.44
7.2.260.0140.00216.34
7.2.250.0100.00616.42
7.2.240.0130.00316.47
7.2.230.0120.00516.33
7.2.220.0110.00416.38
7.2.210.0130.00216.30
7.2.200.0110.00716.44
7.2.190.0130.00316.51
7.2.180.0130.00316.61
7.2.170.0120.00416.55
7.2.160.0110.00516.12
7.2.150.0380.00617.43
7.2.140.0370.00417.52
7.2.130.0310.00417.61
7.2.120.0380.00317.54
7.2.110.0420.00517.62
7.2.100.0340.00517.56
7.2.90.0290.00517.53
7.2.80.0280.00917.59
7.2.70.0320.00417.65
7.2.60.0280.00317.60
7.2.50.0310.00417.51
7.2.40.0360.00417.59
7.2.30.0340.00617.57
7.2.20.0420.00417.63
7.2.10.0290.00517.60
7.2.00.0280.00617.66
7.1.330.0140.00217.36
7.1.320.0120.00417.27
7.1.310.0140.00217.28
7.1.300.0120.00417.45
7.1.290.0120.00317.42
7.1.280.0150.00117.50
7.1.270.0190.00516.41
7.1.260.0370.00416.43
7.1.250.0350.00416.39
7.1.240.0330.00416.33
7.1.230.0340.00416.48
7.1.220.0320.00516.36
7.1.210.0240.00616.40
7.1.200.0340.00216.42
7.1.190.0310.00416.41
7.1.180.0300.00816.37
7.1.170.0280.00616.36
7.1.160.0330.00516.38
7.1.150.0100.00516.32
7.1.140.0300.00216.44
7.1.130.0270.00416.35
7.1.120.0260.00716.36
7.1.110.0330.00116.38
7.1.100.0110.00816.34
7.1.90.0270.00516.68
7.1.80.0240.00516.61
7.1.70.0250.00216.39
7.1.60.0250.00720.17
7.1.50.0120.00820.07
7.1.40.0200.00619.97
7.1.30.0230.00520.12
7.1.20.0230.00819.89
7.1.10.0200.00516.28
7.1.00.0230.00316.39
7.0.330.0250.00616.16
7.0.320.0290.00816.08
7.0.310.0320.00616.04
7.0.300.0340.00316.09
7.0.290.0350.00416.13
7.0.280.0320.00216.18
7.0.270.0270.00416.20
7.0.260.0300.00416.10
7.0.250.0350.00516.22
7.0.240.0260.00516.13
7.0.230.0240.00616.58
7.0.220.0260.00516.45
7.0.210.0270.00516.12
7.0.200.0240.00716.19
7.0.190.0210.00616.18
7.0.180.0200.00616.15
7.0.170.0220.00616.12
7.0.160.0230.00316.03
7.0.150.0230.00516.10
7.0.140.0240.00416.07
7.0.130.0240.00616.26
7.0.120.0180.00816.27
7.0.110.0190.00816.18
7.0.100.0290.00416.16
7.0.90.0260.00516.10
7.0.80.0230.00416.06
7.0.70.0210.00615.96
7.0.60.0210.00516.30
7.0.50.0220.00316.21
7.0.40.0220.00516.25
7.0.30.0230.00516.32
7.0.20.0200.00716.21
7.0.10.0230.00516.24
7.0.00.0290.00416.19
5.6.400.0080.00615.56
5.6.390.0120.00315.63
5.6.380.0080.01015.56
5.6.370.0100.00516.10
5.6.360.0090.00616.10
5.6.350.0130.00316.14
5.6.340.0130.00316.11
5.6.330.0100.00616.03
5.6.320.0120.00316.22
5.6.310.0110.00416.06
5.6.300.0120.00315.89
5.6.290.0110.00416.02
5.6.280.0090.00616.00
5.6.270.0070.00816.17
5.6.260.0100.00516.02
5.6.250.0120.00316.06
5.6.240.0120.00316.04
5.6.230.0140.00216.13
5.6.220.0090.00616.17
5.6.210.0110.00416.24
5.6.200.0130.00216.21
5.6.190.0100.00416.14
5.6.180.0100.00416.08
5.6.170.0100.00416.22
5.6.160.0110.00316.32
5.6.150.0100.00516.25
5.6.140.0090.00516.16
5.6.130.0130.00216.20
5.6.120.0110.00316.15
5.6.110.0120.00316.18
5.6.100.0100.00416.20
5.6.90.0120.00316.11
5.6.80.0090.00416.13
5.6.70.0030.01016.20
5.6.60.0110.00316.08
5.6.50.0080.00616.10
5.6.40.0100.00416.18
5.6.30.0120.00216.19
5.6.20.0090.00515.97
5.6.10.0110.00316.08
5.6.00.0110.00315.96

preferences:
162.72 ms | 1446 KiB | 7 Q