3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1) function teste(int $n = 0): int { if ($n == 0) { return 0; } return $n + 15; } echo teste(11);

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.0270.08020.19
7.0.10.0170.07720.33
7.0.00.0100.08720.22
5.6.170.0400.07720.46
5.6.160.0170.07320.50
5.6.150.0100.08318.18
5.6.140.0100.07318.18
5.6.130.0100.03718.14
5.6.120.0030.05721.12
5.6.110.0100.08021.00
5.6.100.0030.07021.11
5.6.90.0030.08020.97
5.6.80.0130.07720.40
5.5.310.0270.02720.27
5.5.300.0030.08317.95
5.5.290.0100.07718.09
5.5.280.0170.07020.87
5.5.270.0000.07320.86
5.5.260.0070.08720.86
5.5.250.0030.06720.71
5.5.240.0200.07020.26

preferences:
134.17 ms | 1398 KiB | 7 Q