note 96531 deleted from language.oop5.magic by danbrown
| From: | danbrown@php.net | Date: | Wed, 03 Mar 2010 18:21:51 +0000 |
| Subject: | note 96531 deleted from language.oop5.magic by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-166593@lists.php.net to get a copy of this message | ||
Note Submitter: frost at aeonity dot com
----
jahanaddison6, I am not sure what you are expecting here, but because the construct returns false
(which constructors should not return anything and hence it is just ignored) does not mean that the
object will not be instantiated.
So this does infact work as expected, perhaps you need to read more on Constructors.
//START QUOTE//
jahanaddison6 at hotmail dot com
03-May-2009 10:16
If you're expecting this code to work think again:
<?php
class Example
{
public function __construct()
{
return false;
}
public function Test()
{
return true;
}
}
?>
The above code will not work as expected, The Test method will still return true.
//END QUOTE//