At 19:54 21.11.2002, Beau Hartshorne said: --------------------[snip]-------------------- >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: --------------------[snip]--------------------
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 failure. -- >O Ernest E. Vogelsinger (\) ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php