3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test(callable $fn){ $reflection = new ReflectionFunction($fn); $args = count($reflection->getParameters()); $curried = function(...$currArgs) use($args, $fn){ if(count($currArgs) == $args){ return $fn(...$currArgs); }else{ return function(...$currArgs2) use($args, $fn, $currArgs){ return $curried(array_merge($currArgs, $currArgs2)); }; } }; return $curried; } $c = test(fn($x, $y, $z) => $x + $y + $z); echo $c(10)(20,30);

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.140.0070.01118.82
8.3.130.0080.00018.38
8.3.120.0070.00418.85
8.3.110.0080.00020.94
8.3.100.0060.00316.50
8.3.90.0070.01316.88
8.3.80.0030.01018.43
8.3.70.0190.00316.63
8.3.60.0150.00018.68
8.3.50.0140.00716.81
8.3.40.0070.01121.66
8.3.30.0140.00018.77
8.3.20.0100.00724.18
8.3.10.0090.00924.66
8.3.00.0050.00326.16
8.2.250.0060.00316.77
8.2.240.0100.00016.85
8.2.230.0090.00022.58
8.2.220.0000.00824.06
8.2.210.0110.00726.77
8.2.200.0050.00516.50
8.2.190.0160.00016.58
8.2.180.0120.00316.63
8.2.170.0100.01018.83
8.2.160.0170.00722.96
8.2.150.0070.00025.66
8.2.140.0060.00324.66
8.2.130.0050.00326.16
8.2.120.0060.00319.38
8.2.110.0090.00019.32
8.2.100.0040.00717.91
8.2.90.0080.00017.84
8.2.80.0000.00818.04
8.2.70.0000.00817.50
8.2.60.0090.00319.77
8.2.50.0190.00817.48
8.2.40.0230.00019.14
8.2.30.0110.01117.63
8.2.20.0200.00517.37
8.2.10.0110.01119.38
8.2.00.0210.00018.86
8.1.300.0170.00319.63
8.1.290.0060.00318.88
8.1.280.0100.01025.92
8.1.270.0070.00024.66
8.1.260.0000.00826.35
8.1.250.0000.00728.09
8.1.240.0000.00922.24
8.1.230.0080.00422.16
8.1.220.0040.00417.74
8.1.210.0050.00318.79
8.1.200.0050.00317.35
8.1.190.0210.00218.68
8.1.180.0160.00517.23
8.1.170.0120.00917.10
8.1.160.0160.00417.25
8.1.150.0070.01517.13
8.1.140.0100.00917.13
8.1.130.0120.00816.88
8.1.120.0190.00317.38
8.1.110.0150.00517.13
8.1.100.0110.00917.00
8.1.90.0140.00717.48
8.1.80.0180.00317.23
8.1.70.0140.00617.25
8.1.60.0120.01017.46
8.1.50.0120.01117.13
8.1.40.0140.00917.23
8.1.30.0220.00317.38
8.1.20.0180.00317.25
8.1.10.0140.00917.25
8.1.00.0100.01017.25
8.0.300.0040.00419.98
8.0.290.0040.00416.75
8.0.280.0100.01018.40
8.0.270.0040.01516.62
8.0.260.0150.00316.75
8.0.250.0060.01318.37
8.0.240.0180.00016.75
8.0.230.0180.00016.75
8.0.220.0190.00016.63
8.0.210.0140.00516.75
8.0.200.0140.00316.88
8.0.190.0160.00316.75
8.0.180.0160.00516.75
8.0.170.0060.01616.63
8.0.160.0140.00516.73
8.0.150.0100.00816.63
8.0.140.0120.00516.59
8.0.130.0160.00016.50
8.0.120.0050.01518.23
8.0.110.0130.00816.75
8.0.100.0150.00316.48
8.0.90.0120.00616.50
8.0.80.0130.00816.63
8.0.70.0090.00916.62
8.0.60.0100.00916.72
8.0.50.0140.00516.50
8.0.30.0190.00016.63
8.0.20.0120.00616.74
8.0.10.0100.01016.73

preferences:
16.79 ms | 403 KiB | 5 Q