Bug #11685 Updated: Bad Auto-Cast

From: Date: Tue, 26 Jun 2001 11:55:21 +0000
Subject: Bug #11685 Updated: Bad Auto-Cast
Groups: php.dev 
Request: Send a blank email to php-dev+get-58035@lists.php.net to get a copy of this message
ID: 11685 Updated by: jeroen Reported By: Hot Soon<princeali@263.net> Old-Status: Bogus Status: Analyzed Bug Type: Scripting Engine problem Operating system: PHP Version: 4.0.6 Assigned To: jeroen Comments: Indeed, +, -, and * 'autocasting' doesn't work in negative direction, only positive. Previous Comments: --------------------------------------------------------------------------- [2001-06-26 01:30:13] Hot Soon<princeali@263.net> Just run this program: <?php $var=-1073741824; #####^ Here! $var*=2;$var*=2; var_dump($var); ?> It will print out "int(0)". but I believe it should print out"int(-2147483648)" or "float(-2147483648)" like this program: <?php $var=1073741824; #####^ Here! $var*=2;$var*=2; var_dump($var); ?> --------------------------------------------------------------------------- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=11685&edit=2

« previous php.dev (#58035) next »