From:             [EMAIL PROTECTED]
Operating system: FreeBSD
PHP version:      4.2.1
PHP Bug Type:     Arrays related
Bug description:  range() change value of string argument

I have the following code:

<?PHP

$a = "20";
$b = "30";
$result = range($a, $b);
echo $a;

?>

For some reason it display "40".

I know that I have to write 
$result = range((int)$a, (int)$b);
But why range() change value of argument?

-- 
Edit bug report at http://bugs.php.net/?id=21182&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=21182&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=21182&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=21182&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=21182&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=21182&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=21182&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=21182&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=21182&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=21182&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=21182&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=21182&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=21182&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=21182&r=isapi

Reply via email to