Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:55865 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 13734 invoked from network); 18 Oct 2011 21:47:47 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Oct 2011 21:47:47 -0000 Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 207.97.245.133 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 207.97.245.133 smtp133.iad.emailsrvr.com Linux 2.6 Received: from [207.97.245.133] ([207.97.245.133:53782] helo=smtp133.iad.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 03/B8-46813-204FD9E4 for ; Tue, 18 Oct 2011 17:47:47 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp23.relay.iad1a.emailsrvr.com (SMTP Server) with ESMTP id 24ED2348D15; Tue, 18 Oct 2011 17:47:44 -0400 (EDT) X-Virus-Scanned: OK Received: by smtp23.relay.iad1a.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id AEA1D34844F; Tue, 18 Oct 2011 17:47:43 -0400 (EDT) Message-ID: <4E9DF3FF.6050900@sugarcrm.com> Date: Tue, 18 Oct 2011 14:47:43 -0700 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 To: Arnaud Le Blanc , internals@lists.php.net References: <201110142008.56344.arnaud.lb@gmail.com> <20111017130730.GA27102@phcomp.co.uk> <201110182209.37210.arnaud.lb@gmail.com> <20111018214311.GY23271@phcomp.co.uk> In-Reply-To: <20111018214311.GY23271@phcomp.co.uk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Ternary operator performance improvements From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! On 10/18/11 2:43 PM, Alain Williams wrote: > It probably does, but it is quite subtle. I was expecting the above to work since > it does in C -- although in C&variable is an address which can be used in an > expression ... the PHP '&' operator is different, in spite of apparent similarities. Actually, in PHP standalone & doesn't even make any sense. PHP has certain operations - assignment by reference (bind two names to one variable) and passing by reference (which is the same thing but cross-scope) and returning by reference (which again is the same thing but in opposite direction). But unlike C there's no operation "taking reference" because while C has pointers PHP doesn't have anything like that. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227