On 27/06/2016 16:31, Andreas Heigl wrote:
So it crashes with a fatal error when Implementing the interface. It'S
interesting though that the script allows me to instantiate the class
nonetheless.

It sounds to me like the ability of the interactive shell to catch fatal errors and continue allows you to execute code with the engine in a bogus state.

It's possible to do all sorts of wacky things that way:

php > class Bogus implements NonExistent {}
PHP Fatal error: Interface 'NonExistent' not found in php shell code on line 1

Fatal error: Interface 'NonExistent' not found in php shell code on line 1
php > $b = new Bogus;
php > var_dump($b);
object(Bogus)#1 (0) {
}
php > var_dump($b instanceOf NonExistent);
bool(false)
php > var_dump($b instanceOf Bogus);
bool(true)



PHP Fatal error:  Cannot inherit previously-inherited or override
constant C1 from interface I1 in

Can I just say this is a positively hideous error message. I can't actually figure out how to parse its grammar: is it (inherit previously-inherited) OR (override)? If so, what does "inherit previously-inherited" mean?

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to