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
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: 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-2025 The PHP Group
All rights reserved.
Last updated: Mon Jan 13 19:01:29 2025 UTC