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
neral'; [EMAIL PROTECTED]; [EMAIL PROTECTED]; internals@lists.php.net > Subject: 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 > > > Dmitry Stogov wrote: > > > It is bad practice to use echo $fl

[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 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 Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/un

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 17

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
Sebastian Nohn wrote: > $c = $a.""; > $d = (string)$a; Forget that. - Sebastian -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

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:37 PM, Sebastian Nohn wrote: $a = 69; $b = "69"; $c = $a.""; $d = (string)$a; You're converting float to string and THEN trying to output as integer. My patch returns the old behaviour, though you're code is still wrong. -- Wbr, Antony Dovgal -- PHP Intern

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
Antony Dovgal wrote: > 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. > > $a = 69;

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. You're converting float to string and THEN trying to ou

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 5.2.1: -1689934592 2147483647 PHP 5.2.2: -1689934592 6 - Sebastian -- PHP Internals - PHP

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 st

[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 documente

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 men

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 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 D

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: > Marc

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 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 var_dum

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
On Tue, April 17, 2007 9:55 am, Dmitry Stogov wrote: > The float formatting algorithms were changed because of > licensing issues and new ones are not 100% compatible with > previous ones. Could you please provide more details on that? - Sebastian -- PHP Internals - PHP Runtime Development Mai

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% compat

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
.php.net > Subject: [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 > > > Sebastian, > > it should also be mentioned that when you are refferring to a > test within ZF > you should always look > again

[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 somet

[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
PROTECTED]>; <[EMAIL PROTECTED]>; Sent: Monday, April 16, 2007 10:32 AM Subject: [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: 5.2.

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
On Mon, April 16, 2007 10:10 am, Antony Dovgal wrote: > On 04/15/2007 11:05 AM, Sebastian Nohn wrote: >> > $a = 69; >> var_dump($a); >> $b = "A is: ".$a; >> var_dump($b); >> ?> >> >> 5.2.1 output is: >> >> float(6.9E+9) >> string(16) "A is: 69" >> >> 5.2.2-dev output is: >> >> float

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 Tijnema !
On 4/16/07, Antony Dovgal <[EMAIL PROTECTED]> wrote: On 04/15/2007 11:05 AM, Sebastian Nohn wrote: > $a = 69; > var_dump($a); > $b = "A is: ".$a; > var_dump($b); > ?> > > 5.2.1 output is: > > float(6.9E+9) > string(16) "A is: 69" > > 5.2.2-dev output is: > > float(6.9E+9) > strin

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 Antony Dovgal
On 04/15/2007 11:05 AM, Sebastian Nohn wrote: 5.2.1 output is: float(6.9E+9) string(16) "A is: 69" 5.2.2-dev output is: float(6.9E+9) string(12) "A is: 6.9E+9" Nice catch, thanks. What do you think is the most correct output for 1 000 000 000 000 000 (with precision = 14)? Versio

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

2007-04-15 Thread Sebastian Nohn
On Sat, April 14, 2007 8:29 pm, Antony Dovgal wrote: > On 04/14/2007 08:50 PM, Sebastian Nohn wrote: >> On PHP 5.2.1, ZendFramework 0.8.0 Unit Tests pass, while they fail on >> PHP 5.2.2-dev (latest CVS) on the same machine: >> >> 1) testDate(Zend_Date_DateObjectTest) >> Failed asserting that is i

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

2007-04-14 Thread Antony Dovgal
On 04/14/2007 08:50 PM, Sebastian Nohn wrote: On PHP 5.2.1, ZendFramework 0.8.0 Unit Tests pass, while they fail on PHP 5.2.2-dev (latest CVS) on the same machine: 1) testDate(Zend_Date_DateObjectTest) Failed asserting that is identical to .../tests/Zend/Date/DateObjectTest.php:408 Would be