php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #26262 Error in evaluate logical expression
Submitted: 2003-11-15 09:32 UTC Modified: 2003-11-15 12:54 UTC
From: updates at mail dot ru Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 4.3.4 OS: windows 98
Private report: No CVE-ID: None
 [2003-11-15 09:32 UTC] updates at mail dot ru
Description:
------------
Incorrect evaluate logical expression with "and" (with && all O.K.).

Reproduce code:
---------------
<?php
$c = ((1 < 2) and (4 > 3)) and false;
var_dump($c);



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

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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-11-15 12:54 UTC] iliaa@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

and is & not &&
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Jul 19 00:00:03 2025 UTC