Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:9841 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 65153 invoked by uid 1010); 13 May 2004 15:43:04 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 65080 invoked from network); 13 May 2004 15:43:04 -0000 Received: from unknown (HELO theta.altoona-pa.com) (209.161.72.28) by pb1.pair.com with SMTP; 13 May 2004 15:43:04 -0000 Received: from ionzoft-jeg.ionzoft.com (dpvc-207-68-114-163.alt.east.verizon.net [207.68.114.163]) by theta.altoona-pa.com (Postfix) with ESMTP id 62ED1143DB for ; Thu, 13 May 2004 11:43:03 -0400 (EDT) Message-ID: <5.1.0.14.0.20040513114258.02277f08@mail.ionzoft.com> X-Sender: izftjason@mail.ionzoft.com X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Thu, 13 May 2004 11:43:08 -0400 To: internals@lists.php.net Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: Re: [PHP-DEV] Why can constants only be scalars? From: jason@ionzoft.com (Jason Garber) Was this considered? $GLOBALS['foo'] = array('bar', 'baz'); function oink() { echo $GLOBALS['foo']; } ~Jason At 5/13/2004 11:29 AM -0400, Sean Coates wrote: >Ilya Sher wrote: >>We discussed this issue with Jevon Wright (private emails) >>and in the end of the day agreed that most simple yet powerful >>solution is "superglobals", which would work like $_GET,$_POST >>etc. > >This can be accomplished in user-space, by cheating the existing $_* >superglobals (if you must -- cowiki does this, IIRC): > > >$_SERVER['foo'] = array('bar', 'baz'); > >function oink() >{ > print_r($_SERVER['foo']); >} > >oink(); > >?> > >S