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

From: Date: Sat, 17 Mar 2001 00:31:07 +0000
Subject: PHP 4.0 Bug #9800 Updated: Suggestion for "extract" function
Groups: php.dev 
Request: Send a blank email to php-dev+get-49170@lists.php.net to get a copy of this message
ID: 9800 Updated by: jason Reported By: brianauton@eVerian.com Old-Status: Open Status: Closed Bug Type: Feature/Change Request Assigned To: Comments: This feature has already been implemented in CVS a few weeks ago(returns the number of elements inserted into the symbol table), and will be available in 4.0.5 shortly. Previous Comments: --------------------------------------------------------------------------- [2001-03-16 19:11:49] brianauton@eVerian.com 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 --------------------------------------------------------------------------- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=9800&edit=2

« previous php.dev (#49170) next »