3v4l.org

run code in 300+ PHP versions simultaneously
<?php class DEP1{} class DEP2{} class DEP3{} interface A{ function get1(): DEP1; function get2(): DEP2; function get3(): DEP3; } class AImpl implements A{ function __construct(A $DEP){ $this->x = $DEP->get1(); $this->y = $DEP->get2(); $this->z = $DEP->get3(); } function get1(): DEP1{ return $this->x; } function get2(): DEP2{ return $this->y; } function get3(): DEP3{ return $this->z; } } new AImpl(new class implements A{ function get1(): DEP1{ return new DEP1; } function get2(): DEP2{ return new DEP2; } function get3(): DEP3{ return new DEP3; } })

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.0270.05020.02
7.0.10.0130.07720.09
7.0.00.0100.04020.08
5.6.170.0430.07720.47
5.6.160.0000.04320.48
5.6.150.0030.04018.21
5.6.140.0030.05018.18
5.6.130.0070.07318.18
5.6.120.0030.08320.98
5.6.110.0130.08020.96
5.6.100.0000.04320.98
5.6.90.0030.08721.13
5.6.80.0170.07020.50
5.5.310.0230.04320.30
5.5.300.0130.07717.98
5.5.290.0070.08317.96
5.5.280.0070.05320.88
5.5.270.0070.05020.90
5.5.260.0000.04320.87
5.5.250.0070.04020.70
5.5.240.0100.04020.16

preferences:
138.06 ms | 1394 KiB | 7 Q