Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #13896

Re: why is it always an endless loop?

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.internetdienste.de!news.tu-darmstadt.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From Arno Welzel <usenet@arnowelzel.de>
Newsgroups comp.lang.php
Subject Re: why is it always an endless loop?
Date Tue, 17 Jun 2014 08:20:27 +0200
Lines 20
Message-ID <539FDE2B.4070200@arnowelzel.de> (permalink)
References <qw7xoz3y22k8.h8pla1goojcr$.dlg@40tude.net>
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding 7bit
X-Trace individual.net PoBrUA5abWAn4aDGMj6JjwCOfCxv6P4phQzU7rxifL5cO+0Eci
Cancel-Lock sha1:L9OZoC0sqo7n0qkcOtz8PeWC6/k=
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0
In-Reply-To <qw7xoz3y22k8.h8pla1goojcr$.dlg@40tude.net>
X-Enigmail-Version 1.6
Xref csiph.com comp.lang.php:13896

Show key headers only | View raw


richard, 2014-06-16 18:06:

> 
> $a="one"
> $b="one"
> 
> while ($a=$b){echo "equal"; $b="two";)
> 
> This simple code causes an endless loop.
> Why?

Because you STILL don't get the difference between the "=" operator
(assign) and "==" (compare)!


-- 
Arno Welzel
http://arnowelzel.de
http://de-rec-fahrrad.de
http://fahrradzukunft.de

Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

why is it always an endless loop? richard <noreply@example.com> - 2014-06-16 12:06 -0400
  Re: why is it always an endless loop? Markus Heinz <markus.heinz@uni-dortmund.de> - 2014-06-16 18:17 +0200
  Re: why is it always an endless loop? Derek Turner <frderek@cesmail.net> - 2014-06-16 16:19 +0000
  Re: why is it always an endless loop? Stephan Jaschke <stephan@stj-online.de> - 2014-06-16 18:19 +0200
  Re: why is it always an endless loop? Doug Miller <doug_at_milmac_dot_com@example.com> - 2014-06-16 16:35 +0000
  Re: why is it always an endless loop? Denis McMahon <denismfmcmahon@gmail.com> - 2014-06-16 17:27 +0000
  Re: why is it always an endless loop? "J.O. Aho" <user@example.net> - 2014-06-16 20:09 +0200
  Re: why is it always an endless loop? Luuk <luuk@invalid.lan> - 2014-06-16 20:32 +0200
  Re: why is it always an endless loop? Christoph Michael Becker <cmbecker69@arcor.de> - 2014-06-16 21:41 +0200
  Re: why is it always an endless loop? Tim Streater <timstreater@greenbee.net> - 2014-06-16 21:45 +0100
    Re: why is it always an endless loop? Denis McMahon <denismfmcmahon@gmail.com> - 2014-06-16 21:19 +0000
      Re: why is it always an endless loop? Evan Platt <evan@theobvious.espphotography.com.invalid> - 2014-06-16 20:39 -0700
  Re: why is it always an endless loop? Arno Welzel <usenet@arnowelzel.de> - 2014-06-17 08:20 +0200
  Re: why is it always an endless loop? Arno Welzel <usenet@arnowelzel.de> - 2014-06-17 08:22 +0200
    Re: why is it always an endless loop? Denis McMahon <denismfmcmahon@gmail.com> - 2014-06-17 15:13 +0000

csiph-web