Skip to content

Conversation

@bsweeney
Copy link
Member

As indicated in the documentation on inheritance, PHP
requires that classes be defined before they are used.
In terms of a class that extends another class, the
parent should be defined before the child. Earlier
versions of PHP (and indeed the current version) may
have been lenient on this point, but most opcache
engines enforce the stricter ordering requirement.

References:

As indicated in the documentation on inheritance, PHP 
requires that classes be defined before they are used.
In terms of a class that extends another class, the 
parent should be defined before the child. Earlier 
versions of PHP (and indeed the current version) may 
have been lenient on this point, but most opcache 
engines enforce the stricter ordering requirement.

@url http://www.php.net/manual/en/language.oop5.inheritance.php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants