At 19:54 21.11.2002, Beau Hartshorne said:
>I agree that it should return a consistent type. I was planning on
>returning a populated array on success, or a boolean false on fail.
>Instead, I will return an empty (but initialized) array on fail, and use
>the count() function to test for failure like this:

I also have the habit of always having my functions returning a comparable
type. Comparable means you can always use the empty(), isset(), or count()
functions with correct result.

This said I'd suggest to return <<null>> for non-void functions in case of

   >O     Ernest E. Vogelsinger
   (\)    ICQ #13394035

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to