PHP 4.0 Bug #9800: Suggestion for "extract" function

From: Date: Sat, 17 Mar 2001 00:11:49 +0000
Subject: PHP 4.0 Bug #9800: Suggestion for "extract" function
Groups: php.dev 
Request: Send a blank email to php-dev+get-49169@lists.php.net to get a copy of this message
From: brianauton@eVerian.com Operating system: Linux 2.2 (glibc 2.1) PHP version: 4.0.4pl1 PHP Bug Type: Feature/Change Request Bug description: Suggestion for "extract" function The extract() function is a big help, but it would be even better if it returned some information about whether it assigned any variables, rather than just returning NULL. What I really want is for the following code: while($row = mysql_fetch_array($result)) { extract($row); //do something with the variables } to become this: while(extract(mysql_fetch_array($result))) //do something with the variables This would be possible if extract() returned any of the following: -0 or 1 to indicate whether any variables were assigned -the number of variables assigned -or even the array it was given in the first place Just a thought... Brian -- Edit Bug report at: http://bugs.php.net/?id=9800&edit=1

« previous php.dev (#49169) next »