Re: Mixed return type - boolean and array/resource/closure or object

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Robert Stoll wrote:
I think you wander off the subject. We were talking about built-in functions/methods and not about userland
functions/methods.
The original question was if a function/method exists which returns either a boolean or array/resource/closure/object
and I got already helpful answers - thanks again :)
And the last bit of the discussion was just if the documentation should have "mixed" as return type for such
functions/methods or "array/resource/closure/a specific object"

My point(s) were that the documentation for built in functions is not has helpful as CAN be achieved by wrapping those functions in 'userland' methods :) 'mixed' is never the right hint for any of the internal functions, as 'values', 'boolean' and 'null' all provide particular states of result. While some people might prefer that errors are returned as exceptions, returning 'failure' in procedural programming is also how PHP works, and the documentation simply needs to identify those returns.

--
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 General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux