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';
?>