3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A{ protected $stuff = 10; function test(){ return new class extends self($this){ 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.0070.05020.19
7.0.10.0100.08320.15
7.0.00.0070.06720.09
5.6.170.0130.04720.39
5.6.160.0100.08020.46
5.6.150.0070.08018.14
5.6.140.0070.04718.23
5.6.130.0000.04318.18
5.6.120.0130.07021.12
5.6.110.0030.06720.96
5.6.100.0070.08321.01
5.6.90.0070.03720.98
5.6.80.0070.07020.54
5.5.310.0330.06320.41
5.5.300.0100.06318.03
5.5.290.0000.07318.02
5.5.280.0000.04320.85
5.5.270.0100.06720.84
5.5.260.0100.06720.96
5.5.250.0030.09020.62
5.5.240.0070.06720.06

preferences:
140.86 ms | 1394 KiB | 7 Q