php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22994 if ( $something == "NAME") { print $something } prints "0"
Submitted: 2003-03-31 16:45 UTC Modified: 2003-03-31 17:02 UTC
From: hermandepauw at hotmail dot com Assigned:
Status: Not a bug Package: Unknown/Other Function
PHP Version: 4.3.0 OS: Red Hat Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: hermandepauw at hotmail dot com
New email:
PHP Version: OS:

 

 [2003-03-31 16:45 UTC] hermandepauw at hotmail dot com
if ( $something == "NAME") { print $something } prints "0"

the main problem is in the summary ... example code and source on http://www.deparadox.be/php/ i don't know the explain it in words so get a view ... code is only ~10 lines 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-03-31 17:02 UTC] rasmus@php.net
Use === if you want to check both type and value.  The numerical value of "NAME" is indeed 0, so if $something is 0 the condition will be true.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Jul 03 20:01:29 2024 UTC