3v4l.org

run code in 300+ PHP versions simultaneously
<?php class CbMan { public function fn(callable $cb) { echo $cb(); } } class Pippo { public function yah() { return "hello world"; } } $methods = ['yah']; $aa = function($instance, $methods) { return call_user_func($instance, $methods); } $cb = $aa($instance, $methods); $cbman = new CbMan(); $cbman->fn($cb);

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)
5.6.140.0000.07018.17
5.6.130.0070.08018.20
5.6.120.0030.08021.12
5.6.110.0130.08020.90
5.6.100.0070.04020.99
5.6.90.0100.08320.99
5.6.80.0230.05720.48
5.5.300.0070.03318.05
5.5.290.0030.07718.07
5.5.280.0100.05720.77
5.5.270.0200.07320.73
5.5.260.0000.04320.65
5.5.250.0030.08320.80
5.5.240.0000.09020.14
5.4.450.0300.04719.62
5.4.440.0170.06319.18
5.4.430.0270.05019.70
5.4.420.0200.05319.60
5.4.410.0130.06319.50
5.4.400.0430.06019.30
5.4.390.0430.05319.26
5.4.380.0430.05319.26
5.4.370.0530.04318.88
5.4.360.0130.04719.29
5.4.350.0130.08019.16
5.4.340.0230.06019.06
5.4.320.0030.06318.84
5.4.310.0670.05319.16
5.4.300.0430.05018.87
5.4.290.0570.04719.16
5.4.280.0530.06319.25
5.4.270.0470.05319.00
5.4.260.0500.05019.03
5.4.250.0330.06319.14
5.4.240.0570.06019.37
5.4.230.0570.05019.32
5.4.220.0570.05019.12
5.4.210.0400.06019.16
5.4.200.0330.05319.00
5.4.190.0500.05019.12
5.4.180.0530.05018.83
5.4.170.0600.04318.86
5.4.160.0730.04019.04
5.4.150.0700.05019.04
5.4.140.0530.05716.59
5.4.130.0570.04316.55
5.4.120.0330.05316.57
5.4.110.0470.05316.33
5.4.100.0570.04716.57
5.4.90.0570.05316.30
5.4.80.0570.05716.57
5.4.70.0370.06316.61
5.4.60.0630.04716.58
5.4.50.0530.05016.59
5.4.40.0600.04716.58
5.4.30.0400.05016.59
5.4.20.0530.05316.39
5.4.10.0570.05316.25
5.4.00.0670.04715.75

preferences:
139.9 ms | 1394 KiB | 7 Q