Created
May 16, 2018 11:28
-
-
Save qRoC/b3a34012dc3baa7e3791b8b00015d599 to your computer and use it in GitHub Desktop.
typehint parent bug PHP 7.2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
interface ITest { | |
public function test(self $test): void; | |
} | |
class TestBase implements ITest { | |
// all ok | |
public function test(parent $test): void { | |
} | |
} | |
class Test2 extends TestBase { | |
// error | |
//public function test(ITest $test): void {} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment