3v4l.org

run code in 300+ PHP versions simultaneously
<?php class G { public prefixes = array(); public function test($prefix, $baseDir) { if (!isset($this->prefixes[$prefix])) { $this->prefixes[$prefix] = []; } array_push($this->$prefixes[$prefix], $baseDir); } } $l = new G(); $l->test("a", "b"); var_dump($l);

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.07720.20
5.6.160.0130.04720.54
5.6.150.0030.08718.29
5.6.140.0130.07318.15
5.6.130.0130.07318.21
5.6.120.0170.06721.00
5.6.110.0030.08321.13
5.6.100.0030.04020.99
5.6.90.0100.08021.11
5.6.80.0130.07720.48
5.5.300.0030.04017.95
5.5.290.0070.07318.01
5.5.280.0030.04720.61
5.5.270.0070.06320.88
5.5.260.0030.04020.86
5.5.250.0130.05020.77
5.5.240.0300.06320.18

preferences:
122.94 ms | 1398 KiB | 7 Q