3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test(Closure $callback): void { $toto = call_user_func($callback); } $fake = new class { public $called = false; public function __invoke() { $this->called = true; } }; var_dump($fake); test(Closure::fromCallable($fake)); var_dump($fake);

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.5.10.0090.01016.67
8.5.00.0100.01019.99
8.4.160.0120.01023.77
8.4.150.0020.00014.05
8.4.140.0150.00617.76
8.4.130.0100.01017.75
8.4.120.0110.00920.59
8.4.110.0120.00922.36
8.4.100.0120.00917.84
8.4.90.0050.00618.86
8.4.80.0130.00717.81
8.4.70.0120.00917.73
8.4.60.0130.00718.98
8.4.50.0050.00619.00
8.4.40.0030.01219.53
8.4.30.0160.00322.39
8.4.20.0040.01820.15
8.4.10.0100.00719.48
8.3.280.0060.01418.34
8.3.270.0140.00516.53
8.3.260.0110.00916.93
8.3.250.0110.00819.05
8.3.240.0100.00916.58
8.3.230.0050.00316.77
8.3.220.0080.01017.17
8.3.210.0050.00318.53
8.3.200.0060.00316.65
8.3.190.0130.00717.29
8.3.180.0110.00816.80
8.3.170.0160.00317.38
8.3.160.0150.00416.56
8.3.150.0130.00420.61
8.3.140.0060.00317.15
8.3.130.0100.00718.64
8.3.120.0090.00018.93
8.3.110.0030.00620.94
8.3.100.0030.00624.06
8.3.90.0130.00626.77
8.3.80.0030.00918.43
8.3.70.0090.00616.63
8.3.60.0120.00618.43
8.3.50.0150.00517.97
8.3.40.0180.00018.68
8.3.30.0110.00418.86
8.3.20.0030.00521.76
8.3.10.0040.00420.48
8.3.00.0040.00419.38
8.2.290.0120.00720.44
8.2.280.0110.00818.32
8.2.270.0090.00917.61
8.2.260.0090.00918.28
8.2.250.0050.00316.62
8.2.240.0090.00019.07
8.2.230.0040.00422.58
8.2.220.0040.00437.54
8.2.210.0040.00426.77
8.2.200.0060.00316.75
8.2.190.0030.01718.41
8.2.180.0090.00618.19
8.2.170.0100.00322.96
8.2.160.0070.00719.34
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0050.00526.16
8.2.120.0040.00420.91
8.2.110.0050.00522.20
8.2.100.0090.00317.85
8.2.90.0030.00618.34
8.2.80.0000.00819.16
8.2.70.0030.00618.05
8.2.60.0030.00618.19
8.2.50.0000.00818.10
8.2.40.0040.00419.33
8.2.30.0030.00519.23
8.2.20.0000.00817.99
8.2.10.0000.00719.45
8.2.00.0000.00818.05
8.1.330.0110.00721.92
8.1.320.0120.00815.98
8.1.310.0080.00017.03
8.1.300.0090.00318.46
8.1.290.0050.00530.84
8.1.280.0060.00925.92
8.1.270.0080.00020.21
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0090.00019.14
8.1.230.0080.00420.83
8.1.220.0000.00817.74
8.1.210.0030.00518.78
8.1.200.0100.00017.48
8.1.190.0040.00417.23
8.1.180.0050.00318.10
8.1.170.0000.00818.46
8.1.160.0000.00719.00
8.1.150.0040.00418.97
8.1.140.0000.00720.19
8.1.130.0040.00417.34
8.1.120.0020.00517.46
8.1.110.0070.00017.49
8.1.100.0040.00417.37
8.1.90.0040.00417.44
8.1.80.0000.00817.38
8.1.70.0000.00717.46
8.1.60.0000.01117.61
8.1.50.0050.00317.49
8.1.40.0060.00317.41
8.1.30.0000.00717.52
8.1.20.0000.00817.70
8.1.10.0050.00317.52
8.1.00.0000.00917.43
8.0.300.0050.00220.09
8.0.290.0000.00716.88
8.0.280.0050.00318.45
8.0.270.0050.00318.18
8.0.260.0030.00318.38
8.0.250.0030.00517.04
8.0.240.0040.00417.10
8.0.230.0050.00216.92
8.0.220.0030.00316.99
8.0.210.0030.00316.88
8.0.200.0000.00716.93
8.0.190.0030.00517.04
8.0.180.0060.00316.86
8.0.170.0050.00816.98
8.0.160.0000.00816.98
8.0.150.0040.00417.02
8.0.140.0040.00416.91
8.0.130.0030.00313.40
8.0.120.0000.00716.95
8.0.110.0000.00816.91
8.0.100.0030.00516.84
8.0.90.0040.00416.84
8.0.80.0070.01316.95
8.0.70.0070.00016.82
8.0.60.0030.00516.99
8.0.50.0040.00416.84
8.0.30.0080.00917.10
8.0.20.0110.01517.19
8.0.10.0050.00217.07
8.0.00.0110.01016.79
7.4.330.0050.00015.55
7.4.320.0070.00316.54
7.4.300.0000.00616.49
7.4.290.0040.00416.58
7.4.280.0040.00416.64
7.4.270.0080.00016.43
7.4.260.0070.00016.50
7.4.250.0000.00716.56
7.4.240.0030.00516.55
7.4.230.0030.00316.41
7.4.220.0040.00416.27
7.4.210.0080.00916.61
7.4.200.0000.00716.52
7.4.140.0070.01017.86
7.4.130.0100.00716.31
7.4.120.0070.01116.35
7.4.110.0090.00916.46
7.4.100.0200.00816.38
7.4.90.0140.00316.50
7.4.80.0110.01119.39
7.4.70.0050.01516.45
7.4.60.0070.01016.44
7.4.50.0070.01116.19
7.4.40.0040.01316.43
7.4.00.0110.00515.08
7.3.330.0000.00513.25
7.3.320.0000.00713.22
7.3.310.0000.00716.06
7.3.300.0060.00016.10
7.3.290.0070.00016.26
7.3.280.0020.01616.20
7.3.260.0090.01016.34
7.3.240.0100.00916.28
7.3.230.0090.00916.53
7.3.210.0130.00316.46
7.3.200.0090.00616.74
7.3.190.0160.00616.62
7.3.180.0070.01316.24
7.3.170.0160.00716.58
7.3.160.0090.00916.48
7.3.120.0070.01015.00
7.3.110.0030.01414.75
7.3.100.0040.01114.74
7.3.90.0080.00314.81
7.3.80.0000.01014.89
7.3.70.0040.01114.83
7.3.60.0120.00314.89
7.3.50.0030.01014.81
7.3.40.0090.00914.55
7.3.30.0000.01814.55
7.3.20.0230.00515.45
7.3.10.0190.01115.49
7.3.00.0270.01015.51
7.2.330.0130.00416.56
7.2.320.0110.00716.44
7.2.310.0110.00416.78
7.2.300.0030.01316.63
7.2.290.0110.00716.73
7.2.250.0070.01115.17
7.2.240.0100.00715.20
7.2.230.0060.00614.85
7.2.220.0030.01015.03
7.2.210.0070.00715.00
7.2.200.0140.00414.96
7.2.190.0110.00414.94
7.2.180.0110.00714.73
7.2.170.0090.00915.17
7.2.150.0550.00614.77
7.2.140.0610.01014.82
7.2.130.0570.00715.20
7.2.120.0400.00715.04
7.2.110.0490.00015.09
7.2.100.0510.01314.86
7.2.90.0400.00714.72
7.2.80.0590.00314.84
7.2.70.0440.00714.77
7.2.60.0380.01015.04
7.2.50.0510.00615.11
7.2.40.0530.00315.05
7.2.30.0680.00615.22
7.2.20.0650.00314.73
7.2.10.0410.01014.75
7.2.00.1250.00714.87
7.1.330.0080.00315.50
7.1.320.0040.01115.64
7.1.310.0060.00615.48
7.1.300.0070.00715.73
7.1.290.0060.00615.76
7.1.280.0030.01315.92
7.1.270.0070.01015.73
7.1.260.0000.01515.75
7.1.250.0460.00013.66

preferences:
34.77 ms | 403 KiB | 5 Q