NYCPHP Meetup

NYPHP.org

[nycphp-talk] constants vs globals

Chris Bielanski Cbielanski at inta.org
Fri Feb 20 16:43:34 EST 2004


Now that's a classic case of too narrow a scope for a question to be useful
and relevant.

...but at least you didn't get "Ummmmmm because Rasmus said it was, and I
forget why..."

;)

> -----Original Message-----
> From: Hans Zaunere [mailto:hans not junk at nyphp.com]
> Sent: Friday, February 20, 2004 4:39 PM
> To: NYPHP Talk
> Subject: RE: [nycphp-talk] constants vs globals
> 
> 
> 
> > At the PHP conference in New York last spring I remember 
> someone asked
> > Rasmus a question: which is more expensive, accessing a 
> > global or defining
> > a constant? He said without hesitation "defining a constant." 
> > There was
> > silence for a couple beats, then on to the next question.
> 
> At that same conference I chatted with Zeev about this issue, too.  He
> concured, and said that defining a constant is more expensive than
> setting a variable.
> 
> However, somehow I knew he wasn't telling the whole story, so I asked
> why... and why would anyone want a constant, aside from being 
> static and
> globally scoped.
> 
> He said that using constants, once defined, are less expensive than
> variables.  So I said... "hah, thought you'd say something 
> like that..."
> :)
> 
> H
> 
> _______________________________________________
> talk mailing list
> talk at lists.nyphp.org
> http://lists.nyphp.org/mailman/listinfo/talk
> 

>From hans not junk at nyphp.com  Fri Feb 20 16:42:41 2004
Return-Path: <hans not junk at nyphp.com>
Received: from ehost011-1.exch011.intermedia.net (unknown [64.78.21.3])
	by virtu.nyphp.org (Postfix) with ESMTP id 5814BA85EA
	for <talk at lists.nyphp.org>; Fri, 20 Feb 2004 16:42:41 -0500 (EST)
X-MimeOLE: Produced By Microsoft Exchange V6.5.6944.0
Content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Subject: RE: [nycphp-talk] interesting AMP tidbit on Groklaw
Date: Fri, 20 Feb 2004 13:42:48 -0800
Message-ID: <41EE526EC2D3C74286415780D3BA9F87937C9B at ehost011-1.exch011.intermedia.net>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: [nycphp-talk] interesting AMP tidbit on Groklaw
Thread-Index: AcP3XbLvXCkQz49fStuCCQ622fbuKAAnI+bA
From: "Hans Zaunere" <hans not junk at nyphp.com>
To: "NYPHP Talk" <talk at lists.nyphp.org>
X-BeenThere: talk at lists.nyphp.org
X-Mailman-Version: 2.1.2
Precedence: list
Reply-To: NYPHP Talk <talk at lists.nyphp.org>
List-Id: NYPHP Talk  <talk.lists.nyphp.org>
List-Unsubscribe: <http://lists.nyphp.org/mailman/listinfo/talk>,
	<mailto:talk-request at lists.nyphp.org?subject=unsubscribe>
List-Archive: <http://lists.nyphp.org/pipermail/talk>
List-Post: <mailto:talk at lists.nyphp.org>
List-Help: <mailto:talk-request at lists.nyphp.org?subject=help>
List-Subscribe: <http://lists.nyphp.org/mailman/listinfo/talk>,
	<mailto:talk-request at lists.nyphp.org?subject=subscribe>
X-List-Received-Date: Fri, 20 Feb 2004 21:42:41 -0000


> full story here:
> http://www.groklaw.net/article.php?story=3D20040216213026637

Excellent story...

When someone asks "what does PHP stand for" you can say that it's a
recursive acronym:  PHP Helping People
(this one credited to Gales/Lacey prior post on another list).


H




More information about the talk mailing list