Re: [PHP-DOC] cvs: phpdoc /en/functions sockets.xml
> > Can we please agree that a function whose primary return > > type is LONG/STRING/ARRAY/RESOURE/OBJECT and which may return > > FALSE/NULL _only_ in error condition has _not_ a mixed return > > value but has listed only its primary return value. > > > > Its less intuitive for users "mixed? was it now int or > > string.. or even array ?" but it rather makes sense that > > almost all functions return NULL/FALSE when encountering > > error conditions without setting the return type to mixed > > explicitely. > > +1 +1 Added to conventions in the howto. Also added a note about using &return.success; in TRUE/FALSE only cases. Goba
Re: [PHP-DOC] cvs: phpdoc /en/functions sockets.xml
On 2002-8-01 16:08, Markus Fischer wrote: > On Tue, Jan 08, 2002 at 05:55:09AM -, Georg Richter wrote : > > georg Tue Jan 8 00:55:09 2002 EDT > > > > Modified files: > > /phpdoc/en/functionssockets.xml > > Log: > > > > fixed Bug 14894 (examples and function prototype for socket_read) > > Can we please agree that a function whose primary return > type is LONG/STRING/ARRAY/RESOURE/OBJECT and which may return > FALSE/NULL _only_ in error condition has _not_ a mixed return > value but has listed only its primary return value. > > Its less intuitive for users "mixed? was it now int or > string.. or even array ?" but it rather makes sense that > almost all functions return NULL/FALSE when encountering > error conditions without setting the return type to mixed > explicitely. +1 -- Zak Greant PHP Quality Assurance Team http://qa.php.net/ "We must be the change we wish to see." - M. K. Ghandi
Re: [PHP-DOC] cvs: phpdoc /en/functions sockets.xml
On Tue, Jan 08, 2002 at 05:55:09AM -, Georg Richter wrote : > georg Tue Jan 8 00:55:09 2002 EDT > > Modified files: > /phpdoc/en/functions sockets.xml > Log: > > fixed Bug 14894 (examples and function prototype for socket_read) Can we please agree that a function whose primary return type is LONG/STRING/ARRAY/RESOURE/OBJECT and which may return FALSE/NULL _only_ in error condition has _not_ a mixed return value but has listed only its primary return value. Its less intuitive for users "mixed? was it now int or string.. or even array ?" but it rather makes sense that almost all functions return NULL/FALSE when encountering error conditions without setting the return type to mixed explicitely. -- Please always Cc to me when replying to me on the lists.