Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:70815 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 89306 invoked from network); 21 Dec 2013 13:03:15 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Dec 2013 13:03:15 -0000 Authentication-Results: pb1.pair.com smtp.mail=php@tutteli.ch; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=php@tutteli.ch; sender-id=pass Received-SPF: pass (pb1.pair.com: domain tutteli.ch designates 80.74.154.78 as permitted sender) X-PHP-List-Original-Sender: php@tutteli.ch X-Host-Fingerprint: 80.74.154.78 ns73.kreativmedia.ch Linux 2.6 Received: from [80.74.154.78] ([80.74.154.78:58911] helo=hyperion.kreativmedia.ch) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 89/B5-50487-19195B25 for ; Sat, 21 Dec 2013 08:03:14 -0500 Received: (qmail 6488 invoked from network); 21 Dec 2013 14:03:10 +0100 Received: from heim-032-99.raab-heim.uni-linz.ac.at (HELO RoLaptop) (193.171.32.99) by ns73.kreativmedia.ch with (AES128-SHA encrypted) SMTP; 21 Dec 2013 14:03:10 +0100 To: "'Rowan Collins'" , References: <52B40D84.7000209@gmail.com> <001e01cefe37$7718bf50$654a3df0$@tutteli.ch> <52B582A4.1020504@gmail.com> In-Reply-To: <52B582A4.1020504@gmail.com> Date: Sat, 21 Dec 2013 14:03:09 +0100 Message-ID: <003201cefe4c$ff74b010$fe5e1030$@tutteli.ch> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQEYxRSsLHpIZSBkl4qdY6gjRkgYMQH/Zh/3A4JGMqoCMfx1xQI1/RxHAdVWPcMB4oQ9S5teAppg Content-Language: de-ch Subject: RE: [PHP-DEV] Re: power operator (again) From: php@tutteli.ch ("Robert Stoll") > -----Original Message----- > From: Rowan Collins [mailto:rowan.collins@gmail.com] > Sent: Saturday, December 21, 2013 1:00 PM > To: internals@lists.php.net > Subject: Re: [PHP-DEV] Re: power operator (again) > > On 21/12/2013 10:29, Robert Stoll wrote: > > echo ( -3 * 2); // -6 > > $x = -3; > > echo $x * 2; // -6 -> does not behave like (-3) * 2 > > This is an extremely poor choice of example: (-3) * 2 and -(3*2) both > evaluate to -6 anyway, since unary minus is effectively multiplication > by -1, and therefore commutative with multiplication. Indeed, was probably too tired when I wrote the example :) sorry for cluttering up the discussion