I cannot reproduce with 4.1.0RC5 and 4.2.0-dev (cgi).
I suggest to test against 4.1.0RC5 http://www.php.net/~zeev
and 4.2.0-dev http://snaps.php.net

Regards,
--
Yasuo Ohgaki

[EMAIL PROTECTED] wrote:

> From:             [EMAIL PROTECTED]
> Operating system: Debian GNU/Linux 2.2
> PHP version:      4.0.6
> PHP Bug Type:     XML related
> Bug description:  UTF8_ENCODE conflicts with Type Juggling
> 
> Hi,
> 
> Please take a look at this PHP script.
> 
> <?php
> 
> for($j=0; $j<1000; $j++) {
>   $result=71.95;
>   $price=utf8_encode($result);
>   $price = $price * 2.2 / 2.2;
>   echo "$price<br>\n";
> 
> }
> 
> ?>
> 
> This script should just output 1000x exactly the same but as you can see,
> the script sometimes returns "71" instead of "71.95".
> 
> Seems to have to do something with type juggling. If we explecitly cast
> price to a float, ["$price=(float)utf8_encode($result);"] the script
> returns only the correct value.
> 



-- 
Yasuo Ohgaki


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to