php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #6969 operator / assignment presidence
Submitted: 2000-10-01 03:36 UTC Modified: 2000-10-01 03:39 UTC
From: shmengie_2000 at yahoo dot com Assigned:
Status: Closed Package: *General Issues
PHP Version: 4.0.2 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: shmengie_2000 at yahoo dot com
New email:
PHP Version: OS:

 

 [2000-10-01 03:36 UTC] shmengie_2000 at yahoo dot com
This cought me off guard perhaps a bug:

The && operator takes presidence over the assignment operator =  but the 'and' operator does not.

while($row=dbFetch($cursor) && $i < 20) 

$row=(dbFetch($cursor) && i)

where

while($row=dbFetch($cursor) and $i < 20)

$row=(dbFetch($cursor))

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-10-01 03:39 UTC] zak@php.net
This is not a bug - it is documented and expected behavior
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Mon Jul 13 23:00:01 2026 UTC