Is pg_fetch_all
function more efficient than the snippet
while( $res = pg_fetch_assoc($rs) )
{
$out[] = $res;
}
I am wondering how pg_fetch_all
is internally implemented. I want to know whether the while- approach is (much) less efficient than using this function and why.
Internally both snippets include cycles looping through all the fetched rows, so they are quite similar in terms of efficiency. internal implementation of pg_fetch_all