note 53842 added to function.pg-connection-status

From: Date: Wed, 15 Jun 2005 03:33:01 +0000
Subject: note 53842 added to function.pg-connection-status
Groups: php.notes 
Request: Send a blank email to php-notes+get-90437@lists.php.net to get a copy of this message
I think zytox is incorrect, at least in PHP 5.0.4. It returns null, but you have to be careful with your comparison operators. As an example: <?php unset($null); if (pg_connection_status($null)===PGSQL_CONNECTION_OK) echo 'this is not called'; if (pg_connection_status($null)==PGSQL_CONNECTION_OK) echo 'this is called because NULL==0 is true'; ?> ---- Manual Page -- http://www.php.net/manual/en/function.pg-connection-status.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+53842 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+53842&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+53842&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+53842&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+53842&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+53842&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+53842&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#90437) next »