On 17/02/15 15:30, François Laupretre wrote:
>> Returning 'not-zero/empty' as true and 'zero' as false is one of the
>> > natural things to use in PHP and I don't think any other language has
>> > that flexibility?
> You didn't read it right.
> 
> I was talking of conversions *from* bool, not *to* bool. (int -> bool) is 
> fine and will be preserved, but I propose to remove (bool -> int). You will 
> still return numbers as bool, and non-zero will still be converted to true. 
> Relax :)

My current practice up until now has been to use 'return false' when an
action failed, but the main return would be a number of records or
string of data. So you are now blocking that activity ... I'm reading to
right, but you are not thinking all possibilities through. But I think
I'm starting to see it broken already with the other changes to the core
:( I'm not returning 'IS_FALSE' so I'm probably going to have to change
the 'false' to '0' anyway so as to avoid the bool?

-- 
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk

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

Reply via email to