3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { function bar(callable $callable) { $callable(); } function printStr() { echo "hi"; } } $foo = new foo(); $foo->bar(fn() => $foo->printStr());

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.10.0120.00616.82
8.5.00.0140.00919.85
8.4.150.0010.00114.05
8.4.140.0120.00917.44
8.4.130.0090.00619.33
8.4.120.0120.00820.44
8.4.110.0110.00922.51
8.4.100.0120.00420.72
8.4.90.0130.00818.84
8.4.80.0120.00818.83
8.4.70.0070.00218.05
8.4.60.0100.01019.07
8.4.50.0120.00818.40
8.4.40.0080.00017.45
8.4.30.0130.00618.68
8.4.20.0100.01017.99
8.4.10.0060.01019.27
8.3.280.0090.01118.32
8.3.270.0130.00816.45
8.3.260.0130.00516.57
8.3.250.0120.00718.80
8.3.240.0100.00918.64
8.3.230.0080.01116.82
8.3.220.0110.00818.90
8.3.210.0100.01218.33
8.3.200.0040.00516.55
8.3.190.0100.00818.76
8.3.180.0100.00916.50
8.3.170.0090.00920.50
8.3.160.0090.00917.15
8.3.150.0110.00718.82
8.3.140.0040.00416.50
8.3.130.0120.00916.34
8.3.120.0030.00619.03
8.3.110.0030.00616.49
8.3.100.0060.00324.06
8.3.90.0080.00026.77
8.3.80.0090.00018.43
8.3.70.0060.00918.43
8.3.60.0170.00318.43
8.3.50.0110.00416.47
8.3.40.0100.00320.37
8.3.30.0030.01420.34
8.3.20.0080.00024.18
8.3.10.0050.00324.66
8.3.00.0090.00928.09
8.2.290.0090.01020.56
8.2.280.0160.00318.41
8.2.270.0040.01520.45
8.2.260.0000.00816.64
8.2.250.0130.00616.72
8.2.240.0000.00918.69
8.2.230.0060.00320.94
8.2.220.0100.00637.54
8.2.210.0120.00026.77
8.2.200.0060.00316.50
8.2.190.0070.00716.63
8.2.180.0150.00016.75
8.2.170.0070.00722.96
8.2.160.0030.01022.96
8.2.150.0070.00025.66
8.2.140.0050.00324.66
8.2.130.0030.01628.09
8.2.120.0130.00628.09
8.2.110.0150.00328.09
8.2.100.0110.00728.09
8.2.90.0100.01028.09
8.2.80.0100.01028.09
8.2.70.0170.00328.09
8.2.60.0150.00328.09
8.2.50.0160.00328.09
8.2.40.0100.01028.09
8.2.30.0100.01028.09
8.2.20.0160.00328.09
8.2.10.0070.00728.09
8.2.00.0150.00628.09
8.1.330.0070.01221.76
8.1.320.0080.00216.12
8.1.310.0080.01116.76
8.1.300.0060.00918.48
8.1.290.0060.00330.84
8.1.280.0100.00725.92
8.1.270.0060.00322.21
8.1.260.0070.00728.09
8.1.250.0110.00428.09
8.1.240.0100.01028.09
8.1.230.0110.00428.09
8.1.220.0120.00928.09
8.1.210.0130.00728.09
8.1.200.0120.00328.09
8.1.190.0110.00428.09
8.1.180.0070.00728.09
8.1.170.0040.00428.09
8.1.160.0110.00728.09
8.1.150.0110.00728.09
8.1.140.0090.00928.09
8.1.130.0110.00428.09
8.1.120.0150.00028.09
8.1.110.0120.00328.09
8.1.100.0040.01128.09
8.1.90.0070.01328.09
8.1.80.0070.01328.09
8.1.70.0070.01128.09
8.1.60.0060.00928.09
8.1.50.0030.00628.09
8.1.40.0080.00028.09
8.1.30.0060.00328.09
8.1.20.0090.00028.09
8.1.10.0060.00328.09
8.1.00.0100.01428.09

preferences:
46.49 ms | 403 KiB | 5 Q