Created
December 15, 2008 02:06
-
-
Save yrashk/35850 to your computer and use it in GitHub Desktop.
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
<? | |
abstract class AbstractParent { | |
function __construct($param) { print_r($param); } | |
public static function test() { return new self(1234); } | |
} | |
class SpecificClass extends AbstractParent {} | |
SpecificClass::test(); | |
?> | |
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 test.php | |
Fatal error: Cannot instantiate abstract class AbstractParent in test.php on line 8 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment