php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #70247 case eq
Submitted: 2015-08-12 14:14 UTC Modified: 2015-08-12 15:20 UTC
From: rh at hrdns dot de Assigned: cmb (profile)
Status: Not a bug Package: *General Issues
PHP Version: Irrelevant OS: Linux
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: rh at hrdns dot de
New email:
PHP Version: OS:

 

 [2015-08-12 14:14 UTC] rh at hrdns dot de
Description:
------------
Case/EQ Bug?

'c' => 'c'
(int)'c' => '0'
(int)(bool)'c' => '1'

o0 ?

Test script:
---------------
var_dump( 'a' == ((int)'c') );
var_dump( '1' == ((int)'3') );

Expected result:
----------------
bool(false)
bool(false)

Actual result:
--------------
bool(true)
bool(false)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-08-12 15:20 UTC] cmb@php.net
-Status: Open +Status: Not a bug -Assigned To: +Assigned To: cmb
 [2015-08-12 15:20 UTC] cmb@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

See <http://php.net/manual/en/language.types.type-juggling.php#language.types.typecasting>.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Dec 10 02:01:26 2024 UTC