3v4l.org

run code in 300+ PHP versions simultaneously
<?php function decorate(callable $func): callable { return function (mixed ...$args) use ($func): mixed { echo "Do something before the func call.", PHP_EOL; $result = $func(...$args); echo "Do something after the func call.", PHP_EOL; return $result; }; } // ------------------------------------------------------- $func = function (int $x): void { echo $x, PHP_EOL; }; $func = decorate($func); $func(x: 23);

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.10.0040.00419.22
8.3.140.0000.00717.15
8.3.130.0050.00316.61
8.3.120.0060.00319.14
8.3.110.0380.00616.45
8.3.100.0580.01216.39
8.3.90.0530.00016.27
8.3.80.0290.01816.42
8.3.70.0410.00716.40
8.3.60.0390.00816.56
8.3.50.0380.00716.38
8.3.40.0390.00717.09
8.3.30.0290.01017.16
8.3.20.0380.00417.35
8.3.10.0270.01217.42
8.3.00.0190.00619.30
8.2.260.0050.00317.06
8.2.250.0090.00016.66
8.2.240.0060.00317.39
8.2.230.0240.01616.43
8.2.220.0330.00716.16
8.2.210.0320.01316.26
8.2.200.0280.00916.14
8.2.190.0220.00416.37
8.2.180.0320.00716.45
8.2.170.0330.00317.57
8.2.160.0290.00717.65
8.2.150.0260.01117.38
8.2.140.0320.00417.21
8.2.130.0360.01117.52
8.2.120.0310.01117.54
8.2.110.0380.00317.39
8.2.100.0300.00417.37
8.2.90.0330.00717.29
8.2.80.0340.00917.20
8.2.70.0240.00717.35
8.2.60.0330.00417.29
8.2.50.0160.00317.23
8.2.40.0310.00717.70
8.2.30.0180.00817.23
8.2.20.0200.00717.35
8.2.10.0140.00417.41
8.2.00.0110.00717.52
8.1.300.0070.00316.76
8.1.290.0200.00316.10
8.1.280.0130.01316.05
8.1.270.0340.00617.00
8.1.260.0300.00817.35
8.1.250.0300.01217.02
8.1.240.0330.00317.23
8.1.230.0440.00317.02
8.1.220.0470.00917.17
8.1.210.0320.00317.28
8.1.200.0200.01216.91
8.1.190.0200.01017.13
8.1.180.0300.00717.07
8.1.170.0250.01317.15
8.1.160.0320.00617.15
8.1.150.0340.00316.90
8.1.140.0240.01417.11
8.1.130.0280.00917.42
8.1.120.0250.01317.27
8.1.110.0330.00416.88
8.1.100.0350.00417.11
8.1.90.0240.01017.20
8.1.80.0210.01517.10
8.1.70.0270.01017.15
8.1.60.0230.01917.30
8.1.50.0200.00717.08
8.1.40.0200.00417.18
8.1.30.0110.00817.35
8.1.20.0200.01317.36
8.1.10.0210.01217.39
8.1.00.0190.00417.18

preferences:
38.96 ms | 403 KiB | 5 Q