如果没有从 a 返回的行sqlsrv_query
或在遍历资源的所有行之后,是否会立即释放 PHP 资源?
例如,下面的sqlsrv_free_stmt($theRS);
语句实际上是在做任何事情,还是资源已经自动释放?
$theRS = sqlsrv_query(...xxx...)
if (!sqlsrv_has_rows($theRS)) {
echo('No match');
}
else {
while($theARR = sqlsrv_fetch_array($theRS)) {
//code here
}
}
sqlsrv_free_stmt($theRS); //Does this do anything or is the resource already freed at this point?