The wiki page doesn't currently reflect that, but if you're passing PGSQL_CONNECT_ASYNC to pg_connect, creating the connection won't block and transitions through extra states expressed by those constants.

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:<?phpunset($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';?>