A misleading error message

php.internals

Rick Fletcher

22 years ago
With 5RC2 the following code produces a the fatal error "Cannot instantiate abstract class Two." In fact Two is not an abstract class, so the wording tripped me up for a minute. The error actually occurs because Two doesn't implement all of One's abstract methods. Could someone make a change to the error message? <?php abstract class One { abstract function foo(); abstract function bar(); } class Two extends One { public function foo() {} } new Two; ?> --Rick

Wez Furlong

22 years ago
The message is correct; Two is abstract since you haven't implemented a "real" version of bar(). --Wez.