#19867 [Opn->Fbk]: extract function and null values

From: Date: Sat, 12 Oct 2002 07:30:53 +0000
Subject: #19867 [Opn->Fbk]: extract function and null values
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-22206@lists.php.net to get a copy of this message
ID: 19867 Updated by: sniper@php.net Reported By: adamw@uscho.com -Status: Open +Status: Feedback Bug Type: Arrays related Operating System: Linux PHP Version: 4.2.0 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php4-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-latest.zip And if the snapshot doesn't do what you expect, please add a short, self-contained example script here which shows the possible bug clearly. Previous Comments: ------------------------------------------------------------------------ [2002-10-11 11:20:18] adamw@uscho.com In earlier versions of PHP ... when looping through a set of database data, for example, and "extract"ing on each loop -- the extract function would overwrite the variable with the previous value, even if it was NULL. I just recently switched servers that had a more recent version of PHP. Now extract behaves differently. On the next pass through, the variable is not overwritten if the new value is NULL. This requires the use of "unset" on each loop for each variable that could have NULL values. I see nothing in the changelog about this, so I'm trying to determine if it's a bug, or was changed on purpose. If it's a change, I'm not sure I understand why, since it would seem to be much more useful to have it overwritten with the NULL value. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=19867&edit=1

« previous php.bugs (#22206) next »