3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getyear($year) $yearz[] = array("2014","2015","2016","2017","2018","2019","2020"); return($year); ?>

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.00.0100.08720.30
5.6.160.0130.07020.56
5.6.150.0030.04318.14
5.6.140.0070.08018.18
5.6.130.0070.08718.19
5.6.120.0030.04021.14
5.6.110.0070.08321.13
5.6.100.0030.05021.01
5.6.90.0030.07321.10
5.6.80.0070.07720.38
5.5.300.0030.07017.96
5.5.290.0100.08317.98
5.5.280.0030.08720.89
5.5.270.0170.07320.79
5.5.260.0030.04720.86
5.5.250.0030.08720.70
5.5.240.0230.05020.21

preferences:
144.87 ms | 1394 KiB | 7 Q