RE: [PHP-DEV] 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

2007-04-17 Thread Dmitry Stogov
] 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

Re: [PHP-DEV] 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

2007-04-17 Thread Lukas Kahwe Smith
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%

Re: [PHP-DEV] 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

2007-04-17 Thread Marcus Boerger
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

Re: [PHP-DEV] 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

2007-04-17 Thread Sebastian Nohn
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

Re: [PHP-DEV] 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

2007-04-17 Thread Marcus Boerger
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:

Re: [PHP-DEV] 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

2007-04-17 Thread Sean Coates
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

Re: [PHP-DEV] 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

2007-04-17 Thread Sebastian Nohn
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

Re: [PHP-DEV] 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

2007-04-17 Thread Lukas Kahwe Smith
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

[PHP-DEV] Re: [PHP-QA] Re: [PHP-DEV] 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

2007-04-17 Thread Antony Dovgal
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

Re: [PHP-DEV] Re: [PHP-QA] Re: [PHP-DEV] 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

2007-04-17 Thread Rasmus Lerdorf
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

Re: [PHP-DEV] 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

2007-04-17 Thread Sebastian Nohn
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:

Re: [PHP-DEV] 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

2007-04-17 Thread Antony Dovgal
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

Re: [PHP-DEV] 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

2007-04-17 Thread Marcus Boerger
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-DEV] Re: [fw-general] Re: [PHP-DEV] 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

2007-04-17 Thread Stanislav Malyshev
?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

[PHP-DEV] 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

2007-04-16 Thread Thomas Weidner
: [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

[PHP-DEV] 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

2007-04-16 Thread Sebastian Nohn
-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