3v4l.org

run code in 300+ PHP versions simultaneously
<?php class myClass { public function __construct(){ echo __CLASS__; } } $obj = new myClass; $flower = "violet"; $obj->clr = "bluish"; $obj->color = function()use($flower){ $arr = ["rose"=>"red", "violet"=>"blue", "grass"=>"green"]; return $arr[$flower]; }; phpversion() >= "7.0.0" or die() echo "...{$flower}s are ",($obj->color)();

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.0330.06720.10
7.0.10.0030.04320.33
7.0.00.0030.04320.25
5.6.170.0500.06720.45
5.6.160.0100.08020.57
5.6.150.0170.06318.29
5.6.140.0070.03718.10
5.6.130.0070.03718.15
5.6.120.0030.05320.97
5.6.110.0070.04020.98
5.6.100.0100.08320.96
5.6.90.0070.08321.04
5.6.80.0070.08020.54
5.5.310.0300.07720.51
5.5.300.0030.06318.09
5.5.290.0030.09017.97
5.5.280.0100.08320.88
5.5.270.0070.04020.87
5.5.260.0070.03720.94
5.5.250.0070.05020.67
5.5.240.0170.06320.13

preferences:
141.13 ms | 1394 KiB | 7 Q