mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
close #34697: classes should be defined before use
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@219625 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
b99539251a
commit
6a1e089831
2 changed files with 9 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.49 $ -->
|
||||
<!-- $Revision: 1.50 $ -->
|
||||
<appendix id="migration5">
|
||||
<title>Migrating from PHP 4 to PHP 5</title>
|
||||
|
||||
|
@ -95,7 +95,10 @@
|
|||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
You should always define your classes prior to use.
|
||||
In some cases classes must be declared before use. It only happens if
|
||||
some of the new features of PHP 5 (such as <link
|
||||
linkend="language.oop5.interfaces">interfaces</link>) are used.
|
||||
Otherwise the behaviour is the old.
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.18 $ -->
|
||||
<!-- $Revision: 1.19 $ -->
|
||||
|
||||
<sect1 id="language.oop5.basic">
|
||||
<title>The Basics</title>
|
||||
|
@ -131,7 +131,9 @@ EOD;
|
|||
assigned to a variable. An object will always be assigned when
|
||||
creating a new object unless the object has a
|
||||
<link linkend="language.oop5.decon">constructor</link> defined that throws an
|
||||
<link linkend="language.exceptions">exception</link> on error.
|
||||
<link linkend="language.exceptions">exception</link> on error. Classes
|
||||
should be defined before instantiation (and in some cases this is a
|
||||
requirement).
|
||||
</para>
|
||||
<example>
|
||||
<title>Creating an instance</title>
|
||||
|
|
Loading…
Reference in a new issue