3v4l.org

run code in 300+ PHP versions simultaneously
<?php class integer { private $value; public function __construct(int $value = 0) : int { $this->value = $value; return $this->value; } public function __invoke(int ...$value) : int { if (count($value) === 1) $this->value = $value[0]; else throw new Exception('Multiple values given.'); return $this->value; } } $testi = new integer(1); $testi(2);

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)
5.6.150.0100.07718.18
5.6.140.0030.08718.15
5.6.130.0030.08018.19
5.6.120.0070.09721.02
5.6.110.0070.08321.08
5.6.100.0100.06020.98
5.6.90.0070.08020.97
5.6.80.0070.08320.54
5.5.300.0070.08718.05
5.5.290.0030.05317.95
5.5.280.0000.04720.89
5.5.270.0100.07320.76
5.5.260.0000.07020.86
5.5.250.0100.06720.55
5.5.240.0270.06020.27

preferences:
144.21 ms | 939 KiB | 8 Q