3v4l.org

run code in 300+ PHP versions simultaneously
<?php class T1 {} class T2 extends T1 {} class A { /*readonly*/ public T1 $a; public function foo(T1 $a) { $this->a = $a; } } class B extends A { /*readonly*/ public T2 $a; } $foo = new B(); $foo->foo(new T1());

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)
8.2.20.0050.00617.50
7.4.40.0040.01316.31
7.4.30.0070.01316.28
7.4.20.0130.00616.26
7.4.10.0120.00816.24
7.4.00.0080.01216.45
7.3.160.0060.01116.07
7.3.150.0110.00616.25
7.3.140.0080.01116.17
7.3.130.0080.00916.19
7.3.120.0120.00616.22
7.3.110.0070.01216.13
7.3.100.0090.01016.17
7.3.90.0070.01116.24
7.3.80.0070.01316.18
7.3.70.0090.01016.14
7.3.60.0120.00816.17
7.3.50.0050.01116.13
7.3.40.0110.00716.12
7.3.30.0110.01016.15
7.3.20.0100.01017.09
7.3.10.0100.01017.00
7.3.00.0120.00617.00
7.2.290.0130.00316.23
7.2.280.0090.01016.18
7.2.270.0110.00916.32
7.2.260.0110.01016.31
7.2.250.0090.01216.26
7.2.240.0120.00716.22
7.2.230.0110.00616.27
7.2.220.0110.00916.39
7.2.210.0130.00816.16
7.2.200.0080.00916.27
7.2.190.0080.01116.25
7.2.180.0080.01316.32
7.2.170.0090.01216.28
7.2.160.0080.01216.24
7.2.150.0090.00817.30
7.2.140.0090.01017.14
7.2.130.0110.00917.20
7.2.120.0080.01017.19
7.2.110.0090.01017.21
7.2.100.0070.01217.16
7.2.90.0090.00917.32
7.2.80.0110.00917.12
7.2.70.0110.01117.29
7.2.60.0110.01017.26
7.2.50.0090.01017.32
7.2.40.0120.00817.36
7.2.30.0080.01317.23
7.2.20.0110.00817.21
7.2.10.0120.00717.23
7.2.00.0100.00817.18

preferences:
145.72 ms | 1394 KiB | 7 Q