3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); function doSomething(int $value) { // $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.04320.10
7.0.10.0100.08720.22
7.0.00.0170.07320.15
5.6.170.0230.07020.55
5.6.160.0130.08020.57
5.6.150.0130.06318.25
5.6.140.0070.08018.25
5.6.130.0100.05018.15
5.6.120.0100.08021.15
5.6.110.0030.06021.04
5.6.100.0070.08320.98
5.6.90.0170.07720.98
5.6.80.0070.08020.36
5.5.310.0370.07320.35
5.5.300.0130.07317.96
5.5.290.0030.08017.98
5.5.280.0070.07020.90
5.5.270.0070.08320.96
5.5.260.0030.06720.78
5.5.250.0070.08020.69
5.5.240.0200.03720.13

preferences:
141.91 ms | 1394 KiB | 7 Q