3v4l.org

run code in 300+ PHP versions simultaneously
<?php Interface A { public function test(); } class B implements A { public function test() { return $something; } } $someBclass = new B(); if ($someBclass instanceOf A) echo 'instanceOf', PHP_EOL; if (in_array('B' , class_implements($someBclass)) { echo 'Implemented !'.PHP_EOL; }

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.0200.05020.10
7.0.10.0070.04020.23
7.0.00.0100.06020.07
5.6.170.0330.07720.49
5.6.160.0100.08020.61
5.6.150.0070.08018.18
5.6.140.0070.04018.27
5.6.130.0030.05718.18
5.6.120.0000.06721.02
5.6.110.0100.03720.99
5.6.100.0170.07721.09
5.6.90.0070.08321.00
5.6.80.0070.06720.40
5.5.310.0230.08020.33
5.5.300.0030.05317.94
5.5.290.0170.07017.98
5.5.280.0030.04020.85
5.5.270.0070.06320.97
5.5.260.0030.07720.87
5.5.250.0070.07020.71
5.5.240.0000.07720.26

preferences:
143.55 ms | 1394 KiB | 7 Q