3v4l.org

run code in 500+ PHP versions simultaneously
<?php namespace Doctrine\Common\Persistence { interface ObjectRepository { public function find($id); } } namespace Doctrine\ORM { use Doctrine\Common\Persistence\ObjectRepository; class EntityRepository implements ObjectRepository { public function find($id, $lockMode = null, $lockVersion = null) {} } } namespace { use Doctrine\ORM\EntityRepository; class MyRepository extends EntityRepository { public function find($id) {} } }
Output for 8.5.0 - 8.5.3
Fatal error: Declaration of MyRepository::find($id) must be compatible with Doctrine\ORM\EntityRepository::find($id, $lockMode = null, $lockVersion = null) in /in/2akM2 on line 26 Stack trace: #0 {main}
Process exited with code 255.
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.34, 8.2.0 - 8.2.30, 8.3.0 - 8.3.30, 8.4.1 - 8.4.18
Fatal error: Declaration of MyRepository::find($id) must be compatible with Doctrine\ORM\EntityRepository::find($id, $lockMode = null, $lockVersion = null) in /in/2akM2 on line 26
Process exited with code 255.
Output for 7.4.0 - 7.4.33
Fatal error: Declaration of MyRepository::find($id) must be compatible with Doctrine\ORM\EntityRepository::find($id, $lockMode = NULL, $lockVersion = NULL) in /in/2akM2 on line 26
Process exited with code 255.
Output for 7.2.0 - 7.2.33, 7.3.0 - 7.3.33
Fatal error: Declaration of MyRepository::find($id) must be compatible with Doctrine\ORM\EntityRepository::find($id, $lockMode = NULL, $lockVersion = NULL) in /in/2akM2 on line 24
Process exited with code 255.
Output for 5.6.38, 7.0.0 - 7.0.33, 7.1.0 - 7.1.25

preferences:
100.45 ms | 1669 KiB | 4 Q