On Fri, 8 Nov 2002 21:47:56 +0000 (GMT) Philip Olson <[EMAIL PROTECTED]> wrote:

> On Fri, 8 Nov 2002, Maxim Maletsky wrote:
> > 
> > I am not planning to break it whatsoever. But, if a function returns
> > false on failure, why should it be documented differently?
> 
> I was speaking in more of a general sense, like, changing all
> NULL, 0 and -1 that are returned on failure to false in the
> PHP4 source tree is pretty major, not sure if I would like that.
> Maybe in PHP5 :)

I suppose you are refering to code itself. Well - yes - changing the
functions behaviours would create an enourmous compatibility issues. i
am not planning to touch the code for these at all. Mine was only a
concern about the misleads in the documentation about what some few
functiuons return.

PHP core itself, yes, changing all PHP into returning FALSE on failure
would make some sense. And, anyway, these would only be a few functions
(10-15 at most). maybe in PHP5.

Going to edit the documentation now

---
Maxim Maletsky
[EMAIL PROTECTED]




> Cool.
> 
> Regards,
> Philip
> 
> 
> > Philip Olson <[EMAIL PROTECTED]> wrote... :
> > 
> > > 
> > > Just be sure that if it used to return -1 that you leave a note
> > > in the docs when it changed to false.  PHP is open source, 
> > > coders often times use their own personal preference on stuff 
> > > like this.  I'm not sure if php-dev encourages use of boolean 
> > > false or not.  Sometimes it's NULL, 0, -1, or false.  I guess
> > > this is why loose == is more popular than strict === :)
> > > 
> > > Each function documents this individually, nowhere in the docs
> > > does it say false is always returned on failure.  I agree it
> > > would be nice to be more consistant in this regard.  But,
> > > breaking BC is no fun either.
> > > 
> > > Regards,
> > > Philip
> > > 
> > > 
> > > 
> > > 
> > > On Fri, 8 Nov 2002, Maxim Maletsky wrote:
> > > 
> > > > 
> > > > Just because I was on it, I grep'ed my local tree over and over looking
> > > > for wrong "-1" returns.  And so I found more.
> > > > 
> > > > Here is a little snapshot for every function I found. Tell me what you
> > > > think so I go and fix those.
> > > [snip]
> > > 
> > 
> 


-- 
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to