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
 [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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 30 22:01:31 2024 UTC