3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { public function getFunc() { return function () { return true; }; } public function __destruct() { echo "Destructor\n"; } } $foo = new Foo(); $fn = $foo->getFunc(); unset($foo); echo "After Unset\n";

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.1rc10.0000.00816.95
8.0.100.0030.00516.85
8.0.90.0030.00516.80
8.0.80.0030.00416.83
8.0.70.0030.00416.82
8.0.60.0030.00416.81
8.0.50.0030.00416.83
8.0.30.0030.00516.82
8.0.20.0030.00416.87
8.0.10.0030.00416.95
8.0.00.0030.00517.00
7.4.230.0030.00316.49
7.4.220.0040.00316.52
7.4.210.0030.00416.52
7.4.200.0040.00316.55
7.4.190.0040.00316.58
7.4.180.0030.00416.58
7.4.160.0030.00416.57
7.4.150.0040.00316.49
7.4.140.0030.00416.46
7.4.130.0040.00316.45
7.4.120.0030.00416.42
7.4.110.0030.00416.42
7.4.100.0030.00416.50
7.4.90.0040.00316.46
7.4.80.0030.00416.39
7.4.70.0030.00416.43
7.4.60.0030.00416.48
7.4.50.0030.00416.38
7.4.40.0040.00316.38
7.4.30.0030.00416.40
7.4.20.0030.00416.40
7.4.10.0030.00416.45
7.4.00.0030.00416.51
7.3.300.0030.00316.24
7.3.290.0040.00316.23
7.3.280.0030.00416.25
7.3.270.0030.00416.24
7.3.260.0030.00416.25
7.3.250.0040.00316.23
7.3.240.0040.00316.25
7.3.230.0030.00516.24
7.3.220.0030.00416.17
7.3.210.0030.00416.18
7.3.200.0040.00316.15
7.3.190.0030.00416.16
7.3.180.0030.00416.19
7.3.170.0020.00516.17
7.3.160.0040.00416.19
7.3.150.0020.00516.19
7.3.140.0030.00416.17
7.3.130.0030.00416.18
7.3.120.0030.00416.19
7.3.110.0030.00316.10
7.3.100.0030.00416.11
7.3.90.0030.00416.43
7.3.80.0030.00316.19
7.3.70.0030.00416.24
7.3.60.0030.00416.31
7.3.50.0030.00416.30
7.3.40.0030.00416.29
7.3.30.0030.00416.28
7.3.20.0040.00417.06
7.3.10.0040.00417.04
7.3.00.0040.00417.03

preferences:
5754.04 ms | 458 KiB | 11 Q