3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait SomeTrait{ public function inc(){ return ++$this->n; } public function log(){ echo $this->n; } } var $o = new class{private $n = 0; use SomeTrait}; while($o->inc() < 10){ $o->log; }

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.0030.07720.07
5.6.160.0100.06020.50
5.6.150.0100.07718.17
5.6.140.0170.06018.19
5.6.130.0100.06718.29
5.6.120.0100.08020.95
5.6.110.0030.08021.12
5.6.100.0070.07720.89
5.6.90.0100.05321.04
5.6.80.0070.08020.38
5.5.300.0000.04317.93
5.5.290.0070.05017.94
5.5.280.0070.06320.88
5.5.270.0070.06020.65
5.5.260.0030.04020.89
5.5.250.0100.07320.64
5.5.240.0130.03020.13

preferences:
142.33 ms | 1386 KiB | 7 Q