] 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
Sebastian,
it should also be mentioned that when you are refferring to a
test within ZF
you should always look
against the latest version of ZF.
Since 0.8 I've fixed several
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.
The float formatting algorithms were changed because of
licensing issues and new ones are not 100%
Hello Lukas,
float numbers are never perfect values. So should in anyway never rely
on a certain output format. So there is nothing to document here.
best regards
marcus
Tuesday, April 17, 2007, 10:16:39 AM, you wrote:
Dmitry Stogov wrote:
It is bad practice to use echo $float or
Marcus Boerger wrote:
float numbers are never perfect values. So should in anyway never rely
on a certain output format. So there is nothing to document here.
We have a changed behavior here that should be documented. Otherwise
users will run into problems. As the non-academic example that
Hello Sebastian,
lemme try this again. You can in no way rely on the last digits of a float
output. Those depend on your system, your CPU, your ini settings and any
operation you do with floats reduces the accuracy
best regards
marcus
Tuesday, April 17, 2007, 7:45:57 PM, you wrote:
lemme try this again. You can in no way rely on the last digits of a float
output. Those depend on your system, your CPU, your ini settings and any
operation you do with floats reduces the accuracy
It's still a regression, and should be documented.
S
--
PHP Internals - PHP Runtime
Marcus Boerger wrote:
lemme try this again. You can in no way rely on the last digits of a float
output. Those depend on your system, your CPU, your ini settings and any
operation you do with floats reduces the accuracy
If I do the same operation with the same ini setting on exakt the
Marcus Boerger wrote:
Hello Sebastian,
lemme try this again. You can in no way rely on the last digits of a float
output. Those depend on your system, your CPU, your ini settings and any
operation you do with floats reduces the accuracy
yes .. but given no changes to all of the above
On 04/17/2007 09:57 PM, Sean Coates wrote:
lemme try this again. You can in no way rely on the last digits of a float
output. Those depend on your system, your CPU, your ini settings and any
operation you do with floats reduces the accuracy
It's still a regression, and should be
Antony Dovgal wrote:
On 04/17/2007 09:57 PM, Sean Coates wrote:
lemme try this again. You can in no way rely on the last digits of
a float
output. Those depend on your system, your CPU, your ini settings and any
operation you do with floats reduces the accuracy
It's still a
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 = 69;
$b = $a.;
printf(%d, $a); echo \n;
printf(%d, $b); echo \n;
?
PHP 5.2.1:
On 04/17/2007 10:16 PM, Sebastian Nohn wrote:
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 = 69;
$b = $a.; -- that's
Hello Sebastian,
sometimes persistence is good. I take it all back after realising that we
are speaking of the general outputformat. That should of cause stay the
same. Tony mentioned he can fix it. So let the format just stay the same
as Rasmus suggested.
best regards
marcus
Tuesday, April
?php
$a = 69;
$b = $a.;
printf(%d, $a); echo \n;
printf(%d, $b); echo \n;
?
PHP 5.2.1:
-1689934592
2147483647
PHP 5.2.2:
-1689934592
6
Huh, that's a strange thing. Why it happens?
--
Stanislav Malyshev, Zend Products Engineer
[EMAIL PROTECTED] http://www.zend.com/
--
PHP Internals
: [fw-general] Re: [PHP-DEV] ZF 0.8.0 Unit Tests behaving different
on PHP 5.2.1 and PHP 5.2.2-dev
On Mon, April 16, 2007 10:10 am, Antony Dovgal wrote:
On 04/15/2007 11:05 AM, Sebastian Nohn wrote:
?php
$a = 69;
var_dump($a);
$b = A is: .$a;
var_dump($b);
?
5.2.1 output is:
float
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi Thomas,
it should also be mentioned that when you are refferring to a test
within ZF you should always look
against the latest version of ZF.
As already mentioned: This also happens in ZF trunk. ZF unit tests fail
on any platform since
16 matches
Mail list logo