3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Fish { public $common_name; public $flavor; public $record_weight; function __construct($name, $flavor, $record){ $this->common_name = $name; $this->flavor = $flavor; $this->record_weight= $record; } public function getInfo(){ return "A Largemouth Bass is an Excellent flavored fish. The world record weight is 22 pounds 5 ounces." . $this->$common_name $this->$flavor $this->$record_weight; } } $f = new Fish(); $bass = new Fish("Largemouth Bass","Excellent","22 pounds 5 ounces"); echo $f->getInfo();

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.08720.33
7.0.10.0130.08320.15
7.0.00.0070.05320.33
5.6.170.0270.05320.47
5.6.160.0170.07720.57
5.6.150.0100.07718.16
5.6.140.0100.03318.12
5.6.130.0030.04018.21
5.6.120.0070.08321.11
5.6.110.0100.08021.01
5.6.100.0130.07021.00
5.6.90.0070.08320.99
5.6.80.0200.07020.39
5.5.310.0270.08020.35
5.5.300.0030.08017.98
5.5.290.0000.06718.08
5.5.280.0170.05720.97
5.5.270.0070.05020.97
5.5.260.0300.06320.65
5.5.250.0070.07720.55
5.5.240.0200.08020.29

preferences:
142.14 ms | 1394 KiB | 7 Q