Re: PHP 4.0 Bug #4805 Updated: !1 could return 0 instead of false

From: Date: Sun, 04 Jun 2000 15:55:22 +0000
Subject: Re: PHP 4.0 Bug #4805 Updated: !1 could return 0 instead of false
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-20189@lists.php.net to get a copy of this message
Bug Database <php-dev@lists.php.net> wrote: >ID: 4805 >Updated by: stas >Reported By: fuf@fuf.sh.cvut.cz >Status: Closed >Bug Type: Misbehaving function >Assigned To: >Comments: > >Wrong. ! is logical operation, and as such should return boolean. >1 is boolean true, so !1 will be boolean false. If you do not like this, submit feature request. > in my opinion, this _is_ a bug and more specifically a compatibility bug. if !<expression> returned 0 in php3.x the same should be gotten in php4.x. boolean as such in php is pretty much useless anyway and this change causes unnecessary problems when moving from php3 to php4 and is time consuming to fix (simply using sed is not enough). >Full Bug description available at: >http://bugs.php.net/version4/?id=4805 -- fuf ------------------------------ na IRC ------------------------------------- BillGates [bgates@www.microsoft.com] has joined #LINUX ... mode/#linux [+b BillGates!*@*] by DoDad BillGates was kicked off #linux by DoDad (banned: We see enough of Bill Gates already.)

« previous php.dev (#20189) next »