Re: Re: [fw-general] Re: [PHP-DEV] ZF 0.8.0 Unit Tests behaving different on PHP 5.2.1 and PHP 5.2.2-dev

From: Date: Tue, 17 Apr 2007 18:16:01 +0000
Subject: Re: Re: [fw-general] Re: [PHP-DEV] ZF 0.8.0 Unit Tests behaving different on PHP 5.2.1 and PHP 5.2.2-dev
References: 1 2  Groups: php.internals php.qa 
Request: Send a blank email to php-qa+get-28204@lists.php.net to get a copy of this message
Dmitry Stogov wrote: > It is bad practice to use echo $float or var_dump($float) > because they depends on php.ini settings. > You should use printf() of number_format() for deterministic result. <?php $a = 6900000000; $b = $a.""; printf("%d", $a); echo "\n"; printf("%d", $b); echo "\n"; ?> PHP 5.2.1: -1689934592 2147483647 PHP 5.2.2: -1689934592 6 - Sebastian

« previous php.qa (#28204) next »