3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Invoker { public function __invoke() { echo 'hello!'; } } class Obj { public static function method() { } } function doClosure(Closure $closure) { echo 'didClosure...'; $closure(); } function doCallable(callable $cb) { echo 'didCallable...'; $cb(); } doCallable(function () {}); // works doCallable(new Invoker()); // works doCallable(['Obj', 'method']); // works doClosure(function () {}); // works doClosure(new Invoker()); // does not work doClosure(['Obj', 'method']); // does not work

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.120.0060.00319.03
8.3.110.0050.00518.44
8.3.100.0030.01316.60
8.3.90.0040.01126.77
8.3.80.0070.00718.68
8.3.70.0120.00916.45
8.3.60.0110.01116.75
8.3.50.0070.01017.38
8.3.40.0140.00718.88
8.3.30.0110.00318.89
8.3.20.0000.00721.76
8.3.10.0040.00421.90
8.3.00.0000.00819.68
8.2.240.0180.00018.85
8.2.230.0040.00420.94
8.2.220.0050.00524.06
8.2.210.0050.00526.77
8.2.200.0040.00418.54
8.2.190.0100.00716.83
8.2.180.0060.01016.63
8.2.170.0160.00622.96
8.2.160.0040.01119.33
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00419.33
8.2.120.0050.00226.35
8.2.110.0030.00722.26
8.2.100.0000.01219.45
8.2.90.0030.00617.88
8.2.80.0080.00018.82
8.2.70.0120.00017.38
8.2.60.0030.00617.80
8.2.50.0080.00018.07
8.2.40.0080.00018.29
8.2.30.0040.00418.09
8.2.20.0030.00618.05
8.2.10.0040.00418.00
8.2.00.0000.00718.00
8.1.300.0000.00816.61
8.1.290.0060.00318.88
8.1.280.0110.00425.92
8.1.270.0080.00023.80
8.1.260.0030.00526.35
8.1.250.0080.00028.09
8.1.240.0090.00020.64
8.1.230.0090.00317.83
8.1.220.0050.00317.76
8.1.210.0060.00318.77
8.1.200.0080.00017.35
8.1.190.0090.00017.23
8.1.180.0040.00418.10
8.1.170.0080.00018.82
8.1.160.0000.00818.86
8.1.150.0000.00718.88
8.1.140.0040.00417.57
8.1.130.0000.00718.88
8.1.120.0050.00317.32
8.1.110.0040.00417.30
8.1.100.0060.00317.41
8.1.90.0040.00417.34
8.1.80.0030.00617.33
8.1.70.0000.00717.30
8.1.60.0030.00817.51
8.1.50.0050.00217.49
8.1.40.0040.00617.49
8.1.30.0000.00817.59
8.1.20.0060.00617.52
8.1.10.0060.00317.43
8.1.00.0080.00017.50
8.0.300.0070.00018.77
8.0.290.0050.00316.75
8.0.280.0030.00318.32
8.0.270.0000.00717.29
8.0.260.0030.00317.27
8.0.250.0000.00717.01
8.0.240.0020.00516.97
8.0.230.0000.00816.97
8.0.220.0110.00016.77
8.0.210.0070.00016.89
8.0.200.0060.00016.92
8.0.190.0000.00717.02
8.0.180.0040.00416.86
8.0.170.0030.00716.98
8.0.160.0000.00717.03
8.0.150.0040.00416.88
8.0.140.0050.00316.80
8.0.130.0000.00513.46
8.0.120.0070.00016.93
8.0.110.0050.00316.82
8.0.100.0040.00416.82
8.0.90.0060.00316.95
8.0.80.0040.01116.95
8.0.70.0040.00416.94
8.0.60.0070.00016.97
8.0.50.0000.00716.78
8.0.30.0110.00917.11
8.0.20.0070.01217.40
8.0.10.0070.00016.84
8.0.00.0110.00716.75
7.4.330.0030.00315.55
7.4.320.0000.00816.64
7.4.300.0040.00416.50
7.4.290.0030.00316.50
7.4.280.0040.00416.54
7.4.270.0040.00416.60
7.4.260.0040.00416.50
7.4.250.0040.00416.60
7.4.240.0000.00816.61
7.4.230.0000.00716.34
7.4.220.0050.00316.47
7.4.210.0040.01316.54
7.4.200.0000.00716.60
7.4.160.0120.00716.53
7.4.140.0080.01017.86
7.4.130.0060.01116.39
7.4.120.0120.00616.50
7.3.330.0030.00313.36
7.3.320.0030.00313.43
7.3.310.0000.00716.39
7.3.300.0070.00016.33
7.3.290.0000.00716.27
7.3.280.0090.00616.31
7.3.260.0110.01116.40
7.3.240.0110.00616.45
7.2.40.3350.01417.57

preferences:
56.11 ms | 403 KiB | 5 Q