3v4l.org

run code in 300+ PHP versions simultaneously
<?php function add(int $a, int $b) { return $a + $b; } int $a = 5; int $b = 3; echo(add($a, $b));

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)
7.0.10.0030.09020.25
7.0.00.0000.05320.24
5.6.160.0030.06020.48
5.6.150.0170.07318.12
5.6.140.0100.04318.12
5.6.130.0030.08318.18
5.6.120.0030.08721.14
5.6.110.0230.07720.94
5.6.100.0100.07021.00
5.6.90.0030.04321.04
5.6.80.0070.05020.39
5.5.300.0100.04317.95
5.5.290.0070.05017.97
5.5.280.0130.08020.98
5.5.270.0070.05720.68
5.5.260.0070.04720.77
5.5.250.0130.08320.55
5.5.240.0200.07320.27

preferences:
142.78 ms | 939 KiB | 8 Q