php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #7698 False and FALSE constants not reliable
Submitted: 2000-11-08 14:33 UTC Modified: 2000-11-16 05:32 UTC
From: steve at szabos dot com Assigned:
Status: Closed Package: *General Issues
PHP Version: 4.0.3pl1 OS: Windows 2000 Advanced Server
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: steve at szabos dot com
New email:
PHP Version: OS:

 

 [2000-11-08 14:33 UTC] steve at szabos dot com
When is the FALSE constant not False?  

$nResult = odbc_autocommit ($odbcConnection, FALSE)
if ( $nResult != FALSE )
  echo "ERROR: Unable to turn off commits!";

The above code worked most of the time, but sporatically reported an "ERROR:..." condition.   I tried changing "FALSE" to "False", but saw the same behavior.  

I am using the ISAPI DLL.   Perhaps there is a re-entrancy problem?   It works fine for a while after I restart IIS.

For now, I switched my code to use 0 (zero) and 1 (one) everywhere, instead of FALSE and TRUE.   This seems to have fixed the problem.

Steve



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-11-16 05:32 UTC] stas@php.net
Try using !== instead of !=. != is numeric compare.

 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Mon Oct 12 07:00:02 2026 UTC