note 75232 added to ref.memcache
| From: | moazzamkatgmaildotcom at osu1 dot php dot net | Date: | Fri, 18 May 2007 22:25:32 +0000 |
| Subject: | note 75232 added to ref.memcache | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-126700@lists.php.net to get a copy of this message | ||
You can't call parent::__construct() in the constructor of your class if you are extending the
memcache class. However, not running the constructor still initiates it and works fine.
<?php
// wrong
class a extends Memcache {
function __construct($host, $port)
{
parent::__construct();
$this->connect($host, $port);
}
//correct
class a extends Memcache {
function __construct($host, $port)
{
parent::__construct();
$this->connect($host, $port);
}
?>
I am guessing this applies to all native/PECL classes.
----
Server IP: 69.39.81.135
Probable Submitter: 204.141.14.108
----
Manual Page -- http://www.php.net/manual/en/ref.memcache.php
Edit -- https://master.php.net/note/edit/75232
Del: integrated -- https://master.php.net/note/delete/75232/integrated
Del: useless -- https://master.php.net/note/delete/75232/useless
Del: bad code -- https://master.php.net/note/delete/75232/bad+code
Del: spam -- https://master.php.net/note/delete/75232/spam
Del: non-english -- https://master.php.net/note/delete/75232/non-english
Del: in docs -- https://master.php.net/note/delete/75232/in+docs
Del: other reasons-- https://master.php.net/note/delete/75232
Reject -- https://master.php.net/note/reject/75232
Search -- https://master.php.net/manage/user-notes.php