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


Groups > de.comp.lang.php > #4297

Re: prüfen ob eine Funktion etwas ausgibt / - Inhalt hat

From "Christoph M. Becker" <cmbecker69@arcor.de>
Newsgroups de.comp.lang.php
Subject Re: prüfen ob eine Funktion etwas ausgibt / - Inhalt hat
Date 2017-10-10 18:58 +0200
Organization solani.org
Message-ID <oriu7h$m6v$1@solani.org> (permalink)
References <oranpq$1fq$1@dont-email.me> <485c337c-feeb-2d57-3e7e-0cdf9c5c8c7f@arcor.de> <1922764.irdbgypaU6@PointedEars.de> <oriedd$b5b$1@solani.org> <2895559.aeNJFYEL58@PointedEars.de>

Show all headers | View raw


Am 10.10.2017 um 15:31 schrieb Thomas 'PointedEars' Lahn:

> Christoph M. Becker wrote:
> 
>> Interessant – war mir nicht bewusst. Da ist dann wohl das PHP
>> Handbuch[1] fehlerhaft:
>> […]
>>
>> | The value of an assignment expression is the value assigned.
>> […]
>> [1] <http://www.php.net/manual/en/language.operators.assignment.php>
> 
> Das ist nicht fhcsal, aber gerade für Nicht-Muttersprachler 
> missverständlich.  “the value assigned” ist der *adjektivische* Gebrauch des 
> /past participle/ von “assign”, gleichbedeutend mit “assigned value”.  Dort 
> steht ohne Reduktion deshalb “the value that is assigned”; _nicht_ “the 
> value that was/has been assigned” (wegen “is” statt “was”):
> 
> <https://en.wikipedia.org/wiki/Participle#Modern_English>
> 
> „Der zugewiesene Wert“ bzw. „Der Wert, der zugewiesen *wird* (_nicht_: 
> wurde)“ ist nicht unbedingt der Wert, den die *linke* Seite *nach* der 
> Zuweisung hat; es ist aber auf jeden Fall der Wert der rechten Seite.

Okay, gehen wir mal davon aus, dass sich "the value assigned"/"der
zugewiesene Wert" tatsächlich eindeutig auf den Ausdruck auf der rechten
Seite des Operators bezieht. Was ist dann mit folgendem?

  $a = 'a';
  $b = 'b';
  $a .= ($b .= 'c');

Müsste dann nicht $a === 'ac' sein? Oder verhalten sich kombinierte
Zuweisungsoperatoren eben etwas anders, wobei ($a .= $b) als ($a = $a .
$b) interpretiert wird? Dann stellt sich mir allerdings die Frage, wieso
<https://3v4l.org/pO3N9> und <https://3v4l.org/8Wde8> ein so
unterschiedliches Ergebnis haben.

-- 
Christoph M. Becker

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


Thread

prüfen ob eine Funktion etwas ausgibt / - Inhalt hat Josh Mehrtens <jom@mail.invalid> - 2017-10-07 16:19 +0200
  Re: prüfen ob eine Funktion etwas ausgibt / - Inhalt hat "Christoph M. Becker" <cmbecker69@arcor.de> - 2017-10-07 19:49 +0200
    Re: prüfen ob eine Funktion etwas ausgibt / - Inhalt hat Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-10-08 03:19 +0200
      Re: prüfen ob eine Funktion etwas ausgibt / - Inhalt hat Josh Mehrtens <jom@mail.invalid> - 2017-10-10 13:37 +0200
      Re: prüfen ob eine Funktion etwas ausgibt / - Inhalt hat "Christoph M. Becker" <cmbecker69@arcor.de> - 2017-10-10 14:28 +0200
        Re: prüfen ob eine Funktion etwas ausgibt / - Inhalt hat Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-10-10 15:31 +0200
          Re: prüfen ob eine Funktion etwas ausgibt / - Inhalt hat Stefan+Usenet@Froehlich.Priv.at (Stefan Froehlich) - 2017-10-10 13:58 +0000
            Re: prüfen ob eine Funktion etwas ausgibt / - Inhalt hat Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-10-10 16:07 +0200
          Re: prüfen ob eine Funktion etwas ausgibt / - Inhalt hat "Christoph M. Becker" <cmbecker69@arcor.de> - 2017-10-10 18:58 +0200
            Re: prüfen ob eine Funktion etwas ausgibt / - Inhalt hat Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-10-10 20:24 +0200
              Re: prüfen ob eine Funktion etwas ausgibt / - Inhalt hat "Christoph M. Becker" <cmbecker69@arcor.de> - 2017-10-11 01:02 +0200
                Re: prüfen ob eine Funktion etwas ausgibt / - Inhalt hat k@rl.pflaesterer.de (Karl Pflästerer) - 2017-10-11 16:38 +0200
                Re: prüfen ob eine Funktion etwas ausgibt / - Inhalt hat "Christoph M. Becker" <cmbecker69@arcor.de> - 2017-10-12 00:45 +0200
  Re: prüfen ob eine Funktion etwas ausgibt / - Inhalt hat "Christoph M. Becker" <cmbecker69@arcor.de> - 2017-10-07 19:49 +0200
    Re: prüfen ob eine Funktion etwas ausgibt / - Inhalt hat Josh Mehrtens <jom@mail.invalid> - 2017-10-07 23:40 +0200
      Re: prüfen ob eine Funktion etwas ausgibt / - Inhalt hat "Christoph M. Becker" <cmbecker69@arcor.de> - 2017-10-08 01:13 +0200
        Re: prüfen ob eine Funktion etwas ausgibt / - Inhalt hat Josh Mehrtens <jom@mail.invalid> - 2017-10-10 13:34 +0200

csiph-web