3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface FindByNameInterface { public function getFindAllByNameSelect(); } interface FetchableInterface { public function fetchAll(Zend_Db_Select $select); } interface FetchableByNameInterface extends FetchableInterface, FindByNameInterface { } class OurGateway implements FetchableInterface, FindByNameInterface { public function fetchAll(Zend_Db_Select $select) {} public function getFindAllByNameSelect() {} } class SomeMapper { protected $gateway; public function __construct(FetchableByNameInterface $someGateway) { $this->gateway = $someGateway; } } new SomeMapper(new OurGateway);
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught TypeError: SomeMapper::__construct(): Argument #1 ($someGateway) must be of type FetchableByNameInterface, OurGateway given, called in /in/Fo1UF on line 37 and defined in /in/Fo1UF:31 Stack trace: #0 /in/Fo1UF(37): SomeMapper->__construct(Object(OurGateway)) #1 {main} thrown in /in/Fo1UF on line 31
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
41.5 ms | 401 KiB | 8 Q