summaryrefslogtreecommitdiff
path: root/documentation/constructors-and-destructors.html
diff options
context:
space:
mode:
authorEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2014-03-06 18:22:11 +0100
committerEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2014-03-06 18:22:11 +0100
commitd0974d666fda05cf50fa9ce66097d5d0280abd68 (patch)
treeb5fff70192f90541204a1b39a4144e1c1e7fb61a /documentation/constructors-and-destructors.html
parent835c89522e53f267332b2f1690d296416903b96f (diff)
changes to documentation
Diffstat (limited to 'documentation/constructors-and-destructors.html')
-rw-r--r--documentation/constructors-and-destructors.html7
1 files changed, 4 insertions, 3 deletions
diff --git a/documentation/constructors-and-destructors.html b/documentation/constructors-and-destructors.html
index 292aa60..a28f371 100644
--- a/documentation/constructors-and-destructors.html
+++ b/documentation/constructors-and-destructors.html
@@ -54,7 +54,7 @@ int main()
</p>
<p>
The above program crashes (some compilers even refuse to compile this).
- Unlike similar code in PHP. In PHP, when the __construct() method
+ In PHP however, when the __construct() method
gets called, the object is already fully initialized and it is perfectly
legal to make calls to abstract methods that are implemented in derived
classes, as you can see in the following example.
@@ -95,8 +95,9 @@ $d = new DERIVED();
<p>
This PHP script correctly outputs 'doSomething()'. This happens because the
__construct() method in PHP is not a real constructor. It constructs nothing, it
- has access to all members (that already are constructed), and (when available)
- also the base class and overridden methods. In fact, __construct() is a very
+ has access to all members, and (when available)
+ also the base class and overridden methods. In fact, __construct() is not a
+ constructor at all, but a very
normal method that just happens to be the first method that is called right
after the object is constructed, and that is called automatically.
</p>