php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #64658 BOOLEAN TO VARIABLE RETURN ILOGICAL VALUE
Submitted: 2013-04-17 15:33 UTC Modified: 2013-04-17 15:53 UTC
From: mrsnikivan at gmail dot com Assigned:
Status: Not a bug Package: *General Issues
PHP Version: Irrelevant OS: WINDOW XP
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: mrsnikivan at gmail dot com
New email:
PHP Version: OS:

 

 [2013-04-17 15:33 UTC] mrsnikivan at gmail dot com
Description:
------------
I AM USING XAMPP PHP, using assing 

$A= 1==1 AND 2==2;     RETURN TRUE

$A= 1==1 AND 2==7;     RETURN ILOGICAL, RETURN TRUE (TRUNCATE IN AND)

$A= (1==1 AND 2==7);   RETURN FALSE 

$A= 1==2 AND 2==2;     RETURN FALSE



Test script:
---------------




Expected result:
----------------
No truncate assign into instruction "and"  


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-04-17 15:53 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

See operator precedence - http://php.net/operators.precedence AND comes after =

This allows code like
   $conn = mysql_connect() or die("Error");
 [2013-04-17 15:53 UTC] johannes@php.net
-Status: Open +Status: Not a bug
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Jun 14 11:01:33 2025 UTC