PHP 4.0 Bug #4807: !1 could return 0 instead of false

From: Date: Sun, 04 Jun 2000 16:01:52 +0000
Subject: PHP 4.0 Bug #4807: !1 could return 0 instead of false
Groups: php.dev 
Request: Send a blank email to php-dev+get-20190@lists.php.net to get a copy of this message
From: fuf@fuf.sh.cvut.cz Operating system: linux-2.2.14pre16 + some patches PHP version: 4.0.0 Release PHP Bug Type: Feature/Change Request Bug description: !1 could return 0 instead of false hello, 1 returns false now in php4.0 so it's not outputted in echo (echo "!1: " .!1) . "\n"; ) whereas in php3.x !1 returned 0 and was displayed. i know this is not a bug, but it may/does render many scripts (including the ones i'm working on (~50.000 lines)) misbehave in certain conditions and definitely is a compatibility problem. checking_ and changing !<some_expression> to (int)!<some_expression> would take *LOTS* of time, so IMO this behaviour should be changed or at least be configurable via some option. thanks, Michal Vitecek

« previous php.dev (#20190) next »