3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A{ protected $stuff = 10; function test(){ return new class($this) extends self{ function __construct(A $s){ $this->s = $s; } function asd(){ return $this->s->stuff; } }; } } $x = new A; $x->test()->asd();

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.0130.04720.08
7.0.10.0030.09020.16
7.0.00.0070.04720.29
5.6.170.0170.04320.50
5.6.160.0070.07020.47
5.6.150.0130.07018.19
5.6.140.0070.04718.15
5.6.130.0100.03318.28
5.6.120.0030.07721.12
5.6.110.0130.08021.00
5.6.100.0070.08021.00
5.6.90.0000.04320.97
5.6.80.0100.07320.41
5.5.310.0200.04320.32
5.5.300.0000.05017.99
5.5.290.0170.06017.95
5.5.280.0030.04320.85
5.5.270.0070.08720.80
5.5.260.0130.06020.79
5.5.250.0100.07720.66
5.5.240.0030.08020.16

preferences:
140.47 ms | 1394 KiB | 7 Q