3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php namespace jtreminio\AboutMe { class Entity {} abstract class Api { abstract function __construct(Entity $request); } } namespace jtreminio\AboutMe\Entity\User\Create { use jtreminio\AboutMe\Entity; class Request extends Entity { } } namespace jtreminio\AboutMe\Api\User { use jtreminio\AboutMe; use jtreminio\AboutMe\Entity\User; class Create extends AboutMe\Api { /** @var User\Create\Request */ private $request; /** @var string */ private $url = 'https://api.about.me/api/v2/json/user/create/'; /** * @param User\Create\Request $request */ // public function __construct(User\Create\Request $request) public function __construct(Entity $request) { $this->request = $request; } } } $a = new \jtreminio\AboutMe\Entity\User\Create\Request();
Output for 5.4.0 - 5.4.28
Fatal error: Declaration of jtreminio\AboutMe\Api\User\Create::__construct() must be compatible with jtreminio\AboutMe\Api::__construct(jtreminio\AboutMe\Entity $request) in /in/m2CgM on line 41
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Fatal error: No code may exist outside of namespace {} in /in/m2CgM on line 45
Process exited with code 255.