note 103829 added to memcache.connect
| From: | cloakedninjas at osu1 dot php dot net | Date: | Thu, 05 May 2011 14:52:16 +0000 |
| Subject: | note 103829 added to memcache.connect | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-179454@lists.php.net to get a copy of this message | ||
Further to Geoffrey's post.
Using the OO approach, connect() will always return an object, whether the server is available or
not.
<?php
// will always return an object
$memcache = @$memcache->connect($server, $port);
?>
Only using the procedural memcache_connect can you get a boolean to work with.
----
Server IP: 192.41.42.26
Probable Submitter: 109.174.167.114
----
Manual Page -- http://www.php.net/manual/en/memcache.connect.php
Edit -- https://master.php.net/note/edit/103829
Del: integrated -- https://master.php.net/note/delete/103829/integrated
Del: useless -- https://master.php.net/note/delete/103829/useless
Del: bad code -- https://master.php.net/note/delete/103829/bad+code
Del: spam -- https://master.php.net/note/delete/103829/spam
Del: non-english -- https://master.php.net/note/delete/103829/non-english
Del: in docs -- https://master.php.net/note/delete/103829/in+docs
Del: other reasons-- https://master.php.net/note/delete/103829
Reject -- https://master.php.net/note/reject/103829
Search -- https://master.php.net/manage/user-notes.php