Re: [PHP-DEV] Re: [PHP-WEBMASTER] New wiki account

2012-05-12 Thread Dmitri Ravazin
On Sat, May 12, 2012 at 12:22 AM, Alexander Moskaliov ir...@irker.net wrote:
 2012/5/12 Dmitri Ravazin rava...@gmail.com

 Yes... That's just what I had in the RFC.


 Not at all. In RFC you use first expression in for ... else statement as
 condition for else statement.

 if (some_very_expensive_and_ugly_looking_calculation($array)  0) {

 }


  I think it correct to use the second expression before the start of
 looping, as I described in previous mail.

That if is testing the inverse condition of $exp2 from for, so it
will yield exactly the same result.
If some_very_expensive_and_ugly_looking_calculation($array) is less
than 0, then it can't be greater of equal than 0 at the same time, so
for loop will not be entered.
It is assumed, of course, that the function does not modify the data.
If it did, then yeah, we'd need a temporary variable.

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DEV] bug 54547

2012-05-12 Thread Stas Malyshev
Hi!

I know this was discussed a number of times here, but just to bring it
to a conclusion - I intend to apply patch in the bug report - which
removes conversion for strings that do not convert to integers - to 5.4.
If anybody sees anything that breaks because of this please tell. Not
sure what about 5.3 - Johannes, could you please comment?
I've run the tests and the patch does not seem to cause any breakage.
-- 
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php