3v4l.org

run code in 300+ PHP versions simultaneously
<?php final class DemoFile { public function run() { $test = 'Super'; $this->myCallback( function () use ($test) { return compact('test'); } ); } private function myCallback($callback) { var_dump($callback()); } } $d = new DemoFile(); $d->run();

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.20.0100.00820.03
8.5.10.0100.00918.54
8.5.00.0130.00922.86
8.4.170.0120.00923.89
8.4.160.0110.01123.84
8.4.150.0060.00716.83
8.4.140.0110.01017.44
8.4.130.0420.00617.44
8.4.120.0380.00717.77
8.4.110.0410.01117.84
8.4.100.0260.00717.79
8.4.90.0390.01117.60
8.4.80.0410.01117.43
8.4.70.0430.00817.56
8.4.60.0390.01217.83
8.4.50.0370.01217.56
8.4.40.0470.01017.23
8.4.30.0400.01117.59
8.4.20.0400.00717.32
8.4.10.0300.00519.19
8.3.300.0110.00619.07
8.3.290.0120.00918.33
8.3.280.0030.00014.05
8.3.270.0100.00916.53
8.3.260.0220.00516.59
8.3.250.0190.00516.43
8.3.240.0340.00816.70
8.3.230.0280.00416.42
8.3.220.0360.00816.25
8.3.210.0430.00516.57
8.3.200.0400.00816.69
8.3.190.0230.00716.43
8.3.180.0270.00316.24
8.3.170.0240.00716.34
8.3.160.0390.00816.16
8.3.150.0400.00616.47
8.3.140.0240.00816.32
8.3.130.0370.01016.20
8.3.120.0360.01116.48
8.3.110.0300.00716.40
8.3.100.0440.00716.31
8.3.90.0400.00916.07
8.3.80.0460.00715.97
8.3.70.0450.00616.34
8.3.60.0320.00716.04
8.3.50.0430.00716.36
8.3.40.0430.00817.14
8.3.30.0230.00417.50
8.3.20.0370.00717.55
8.3.10.0260.01217.09
8.3.00.0330.01117.32
8.2.300.0110.00918.10
8.2.290.0400.00616.38
8.2.280.0250.01016.49
8.2.270.0240.00716.22
8.2.260.0370.01016.34
8.2.250.0350.00716.23
8.2.240.0350.00616.69
8.2.230.0360.00716.32
8.2.220.0390.00616.44
8.2.210.0370.00616.47
8.2.200.0350.00516.46
8.2.190.0360.00816.41
8.2.180.0380.00716.57
8.2.170.0400.00617.65
8.2.160.0370.00817.51
8.2.150.0370.00917.49
8.2.140.0330.00917.60
8.2.130.0150.00617.63
8.2.120.0360.00417.48
8.2.110.0410.00617.57
8.2.100.0350.01217.40
8.2.90.0380.00617.49
8.2.80.0390.00517.41
8.2.70.0380.00617.49
8.2.60.0320.01117.60
8.2.50.0360.00717.51
8.2.40.0390.00817.70
8.2.30.0340.00917.38
8.2.20.0380.00817.25
8.2.10.0220.00217.61
8.2.00.0250.01217.32
8.1.340.0120.00819.74

preferences:
29.7 ms | 403 KiB | 5 Q