3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1) function doSomething(int $value) : int { $value = "" . $value; return $value } doSomething(12);

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.20.0300.07020.09
7.0.10.0030.04320.17
7.0.00.0130.04320.33
5.6.170.0400.07320.56
5.6.160.0100.08020.46
5.6.150.0030.08718.18
5.6.140.0000.08718.11
5.6.130.0100.05718.18
5.6.120.0130.07720.96
5.6.110.0070.04021.01
5.6.100.0070.07321.01
5.6.90.0030.09020.85
5.6.80.0070.07720.43
5.5.310.0270.08020.30
5.5.300.0070.08017.98
5.5.290.0070.06318.00
5.5.280.0100.07720.89
5.5.270.0100.07720.84
5.5.260.0100.07720.89
5.5.250.0170.07320.68
5.5.240.0170.04320.19

preferences:
140.48 ms | 1394 KiB | 7 Q