php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #42963 Look this code! The variable is casting wrong?
Submitted: 2007-10-14 19:31 UTC Modified: 2007-10-14 19:36 UTC
From: webcreator at email dot it Assigned:
Status: Not a bug Package: Variables related
PHP Version: 5.2.4 OS: ubuntu 7.10
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: webcreator at email dot it
New email:
PHP Version: OS:

 

 [2007-10-14 19:31 UTC] webcreator at email dot it
Description:
------------
See the code is very simple...the casting for 0 is wrong

Reproduce code:
---------------
<?php
$pino = 0;
if($pino == "uno")
{
echo "sono uguali";
}
else
{
echo "non sono uguali";
}
?>

Expected result:
----------------
non sono uguali

Actual result:
--------------
sono uguali

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-10-14 19:36 UTC] johannes@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri May 09 17:01:28 2025 UTC