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.5.20.0130.00518.05
8.5.10.0130.00516.77
8.5.00.0160.00620.18
8.4.160.0110.01023.91
8.4.150.0020.00014.05
8.4.140.0150.00617.32
8.4.130.0140.00618.78
8.4.120.0110.00824.26
8.4.110.0070.00318.66
8.4.100.0050.00418.75
8.4.90.0060.00420.93
8.4.80.0080.00518.77
8.4.70.0100.01017.66
8.4.60.0120.00718.91
8.4.50.0120.01024.20
8.4.40.0030.01617.77
8.4.30.0160.00318.84
8.4.20.0070.01317.65
8.4.10.0080.00019.37
8.3.290.0110.01220.59
8.3.280.0120.00818.30
8.3.270.0130.00716.59
8.3.260.0130.00616.52
8.3.250.0140.00618.98
8.3.240.0080.00617.05
8.3.230.0130.00616.54
8.3.220.0090.00818.77
8.3.210.0110.00916.63
8.3.200.0070.00216.74
8.3.190.0120.00717.16
8.3.180.0120.00616.57
8.3.170.0180.00018.95
8.3.160.0070.00019.97
8.3.150.0100.01019.00
8.3.140.0000.00816.49
8.3.130.0070.00716.56
8.3.120.0000.00918.91
8.3.110.0030.00620.94
8.3.100.0120.00624.06
8.3.90.0120.00326.77
8.3.80.0090.00018.18
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.300.0040.00622.20
8.2.290.0100.00820.50
8.2.280.0150.00619.95
8.2.270.0090.00919.19
8.2.260.0150.00318.13
8.2.250.0080.00016.60
8.2.240.0110.00417.32
8.2.230.0070.00322.58
8.2.220.0060.00337.54
8.2.210.0040.00426.77
8.2.200.0090.00016.75
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.340.0100.01021.73
8.1.330.0100.01021.75
8.1.320.0100.00916.19
8.1.310.0040.00418.69
8.1.300.0060.01217.64
8.1.290.0060.00330.84
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:
87.69 ms | 403 KiB | 5 Q