Re: found more return inconsistacies

From: Date: Fri, 08 Nov 2002 21:47:56 +0000
Subject: Re: found more return inconsistacies
References: 1  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969349497@lists.php.net to get a copy of this message
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 :) > You are right, though, I will research on every each of them whether > this was every changed between the versions to mention it later in the > docs. Cool. Regards, Philip > Philip Olson <philip@cornado.com> 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] > > >

« previous php.doc (#969349497) next »