3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { function bar(callable $callable) { $callable($this); } function printStr() { echo "hi"; } } $foo = new foo(); $foo->bar(function ($that) { $that->printStr(); // Using $this when not in object context });

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.70.0110.01116.75
8.3.60.0100.00718.07
8.3.50.0180.00016.48
8.3.40.0070.00720.42
8.3.30.0060.00920.30
8.3.20.0040.00424.18
8.3.10.0040.00424.66
8.3.00.0070.01428.09
8.2.190.0120.00916.63
8.2.180.0120.00316.47
8.2.170.0070.01118.84
8.2.160.0070.01322.96
8.2.150.0000.00725.66
8.2.140.0080.00024.66
8.2.130.0070.01328.09
8.2.120.0170.00328.09
8.2.110.0080.01228.09
8.2.100.0110.00828.09
8.2.90.0070.01428.09
8.2.80.0130.00928.09
8.2.70.0150.00728.09
8.2.60.0130.00328.09
8.2.50.0150.00628.09
8.2.40.0090.00928.09
8.2.30.0060.00928.09
8.2.20.0170.00328.09
8.2.10.0080.00828.09
8.2.00.0110.00428.09
8.1.280.0140.00725.92
8.1.270.0040.00423.77
8.1.260.0120.00628.09
8.1.250.0080.00028.09
8.1.240.0060.00328.09
8.1.230.0120.00328.09
8.1.220.0030.00628.09
8.1.210.0190.00028.09
8.1.200.0060.00328.09
8.1.190.0110.00828.09
8.1.180.0030.00628.09
8.1.170.0110.00728.09
8.1.160.0080.00828.09
8.1.150.0080.00028.09
8.1.140.0110.00428.09
8.1.130.0060.00928.09
8.1.120.0040.00428.09
8.1.110.0150.00028.09
8.1.100.0110.00428.09
8.1.90.0050.00528.09
8.1.80.0030.00628.09
8.1.70.0090.00028.09
8.1.60.0040.00428.09
8.1.50.0080.00028.09
8.1.40.0060.00328.09
8.1.30.0040.00428.09
8.1.20.0080.00028.09
8.1.10.0040.00428.09
8.1.00.0090.00028.09

preferences:
31.3 ms | 401 KiB | 5 Q