3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Bug1971; class HelloWorld { public function sayHello(): void { echo 'Hello'; } public function getClosure(): void { $closure1 = \Closure::fromCallable([self::class, 'sayHello']); $closure1(); $closure2 = \Closure::fromCallable([static::class, 'sayHello']); $closure2(); //$closure2 = \Closure::fromCallable([static::class, 'sayHello2']); //$closure2(); } } $hw = new HelloWorld(); $hw->getClosure();

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.4.140.0100.01117.49
8.4.130.0110.00819.73
8.4.120.0150.00422.46
8.4.110.0110.00919.05
8.4.100.0120.00918.76
8.4.90.0120.00820.90
8.4.80.0050.00318.62
8.4.70.0040.00418.05
8.4.60.0160.00718.86
8.4.50.0080.01218.73
8.4.40.0040.00417.62
8.4.30.0100.00720.51
8.4.20.0070.01319.57
8.4.10.0140.00717.90
8.3.270.0130.00716.68
8.3.260.0100.01016.55
8.3.250.0130.00618.72
8.3.240.0070.01217.22
8.3.230.0130.00716.59
8.3.220.0140.00518.92
8.3.210.0050.00316.40
8.3.200.0050.00416.82
8.3.190.0040.00418.84
8.3.180.0120.00616.79
8.3.170.0120.00618.81
8.3.160.0000.01516.57
8.3.150.0110.00716.99
8.3.140.0090.00016.68
8.3.130.0030.00616.79
8.3.120.0040.00418.96
8.3.110.0060.00320.94
8.3.100.0060.00316.36
8.3.90.0030.00526.77
8.3.80.0090.00016.50
8.3.70.0120.00616.58
8.3.60.0150.00716.36
8.3.50.0140.00719.92
8.3.40.0100.00319.01
8.3.30.0070.00718.71
8.3.20.0070.00024.18
8.3.10.0000.00824.66
8.3.00.0000.00826.16
8.2.290.0090.00920.20
8.2.280.0130.00718.28
8.2.270.0080.01117.00
8.2.260.0090.00616.74
8.2.250.0090.00016.68
8.2.240.0040.01216.63
8.2.230.0070.00022.58
8.2.220.0050.00524.06
8.2.210.0040.00426.77
8.2.200.0000.01116.50
8.2.190.0070.01017.00
8.2.180.0170.00025.92
8.2.170.0140.00718.88
8.2.160.0070.00722.96
8.2.150.0040.00425.66
8.2.140.0090.00524.66
8.2.130.0040.00426.16
8.2.120.0000.00726.16
8.2.110.0070.00319.33
8.2.100.0040.00717.91
8.2.90.0040.00419.36
8.2.80.0080.00018.03
8.2.70.0100.00017.63
8.2.60.0000.00817.93
8.2.50.0100.00018.07
8.2.40.0000.00917.62
8.2.30.0080.00017.63
8.2.20.0040.00419.39
8.2.10.0030.00517.75
8.2.00.0040.00719.13
8.1.330.0120.00721.67
8.1.320.0090.00818.02
8.1.310.0080.00016.20
8.1.300.0080.00818.21
8.1.290.0090.00030.84
8.1.280.0180.00025.92
8.1.270.0080.00023.99
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0090.00022.46
8.1.230.0070.00420.90
8.1.220.0040.00418.77
8.1.210.0000.00919.06
8.1.200.0030.00717.22
8.1.190.0000.00817.53
8.1.180.0050.00318.10
8.1.170.0080.00017.62
8.1.160.0000.00818.90
8.1.150.0080.00018.52
8.1.140.0000.00717.47
8.1.130.0030.00318.84
8.1.120.0000.00717.37
8.1.110.0040.00417.39
8.1.100.0060.00317.48
8.1.90.0040.00417.38
8.1.80.0070.00317.34
8.1.70.0000.00717.50
8.1.60.0000.00817.64
8.1.50.0050.00317.54
8.1.40.0060.00317.55
8.1.30.0030.00517.57
8.1.20.0040.00417.63
8.1.10.0030.00617.55
8.1.00.0040.00417.45
8.0.300.0040.00420.04
8.0.290.0000.00717.18
8.0.280.0030.00317.95
8.0.270.0030.00316.82
8.0.260.0070.00018.39
8.0.250.0040.00416.95
8.0.240.0000.00716.85
8.0.230.0030.00316.97
8.0.220.0030.00316.93
8.0.210.0080.00016.79
8.0.200.0000.00716.95
8.0.190.0060.00316.97
8.0.180.0080.00016.91
8.0.170.0060.00316.98
8.0.160.0040.00416.87
8.0.150.0030.00616.88
8.0.140.0000.00716.91
8.0.130.0000.00613.30
8.0.120.0040.00813.36
8.0.110.0040.00813.26
8.0.100.0110.00213.29
8.0.90.0130.00013.36
8.0.80.0140.00013.30
8.0.70.0090.00513.31
8.0.60.0090.00413.27
8.0.50.0080.00613.29
8.0.30.0030.01013.27
8.0.20.0120.00213.42
8.0.10.0070.00713.45
8.0.00.0030.00313.48
7.4.330.0030.00315.55
7.4.320.0000.00616.52
7.4.300.0030.00316.46
7.4.290.0030.00516.45
7.4.280.0080.00016.58
7.4.270.0040.00416.58
7.4.260.0000.00613.24
7.4.250.0110.00413.27
7.4.240.0120.00213.30
7.4.230.0120.00313.23
7.4.220.0140.00013.30
7.4.210.0100.00313.31
7.4.200.0100.00513.30
7.4.190.0100.00313.37
7.4.180.0040.00813.34
7.4.160.0070.00713.46
7.4.150.0120.00213.27
7.4.140.0130.00313.33
7.4.130.0130.00013.21
7.4.120.0070.00713.28
7.4.110.0000.01313.19
7.4.100.0140.00013.21
7.4.90.0060.00613.32
7.4.80.0080.00513.21
7.4.70.0060.00613.21
7.4.60.0100.00313.20
7.4.50.0130.00013.14
7.4.40.0040.00813.17
7.4.30.0070.00713.28
7.4.20.0040.00913.25
7.4.10.0120.00013.20
7.4.00.0070.00813.23
7.3.330.0000.00716.07
7.3.320.0070.00813.08
7.3.310.0080.00513.13
7.3.300.0070.00713.32
7.3.290.0110.00413.16
7.3.280.0090.00613.21
7.3.270.0100.00513.23
7.3.260.0110.00413.16
7.3.250.0070.00713.06
7.3.240.0140.00013.07
7.3.230.0130.00013.23
7.3.220.0110.00413.18
7.3.210.0100.00413.25
7.3.200.0140.00013.04
7.3.190.0090.00513.22
7.3.180.0110.00413.21
7.3.170.0150.00013.07
7.3.160.0120.00313.23
7.3.150.0100.00313.20
7.3.140.0110.00213.17
7.3.130.0130.00313.23
7.3.120.0070.00713.31
7.3.110.0100.00513.18
7.3.100.0140.00013.17
7.3.90.0120.00313.50
7.3.80.0110.00313.02
7.3.70.0140.00013.14
7.3.60.0100.00513.38
7.3.50.0150.00013.45
7.3.40.0140.00013.23
7.3.30.0110.00413.22
7.3.20.0070.00715.20
7.3.10.0150.00015.08
7.3.00.0170.00014.99

preferences:
38.19 ms | 403 KiB | 5 Q