Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:33181 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 30167 invoked by uid 1010); 16 Nov 2007 21:58:22 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 30152 invoked from network); 16 Nov 2007 21:58:22 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Nov 2007 21:58:22 -0000 Authentication-Results: pb1.pair.com smtp.mail=johannes@php.net; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=johannes@php.net; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 83.243.58.163 as permitted sender) X-PHP-List-Original-Sender: johannes@php.net X-Host-Fingerprint: 83.243.58.163 mail4.netbeat.de Received: from [83.243.58.163] ([83.243.58.163:55160] helo=mail4.netbeat.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 94/1D-51194-A721E374 for ; Fri, 16 Nov 2007 16:58:21 -0500 Received: (qmail 9504 invoked by uid 507); 16 Nov 2007 21:58:12 -0000 Received: from unknown (HELO ?192.168.1.102?) (postmaster%schlueters.de@82.135.85.124) by mail4.netbeat.de with ESMTPA; 16 Nov 2007 21:58:12 -0000 To: Sam Barrow Cc: internals@lists.php.net In-Reply-To: <1195246391.21084.15.camel@sbarrow-desktop> References: <8D.46.01128.768AD374@pb1.pair.com> <1195246391.21084.15.camel@sbarrow-desktop> Content-Type: text/plain Date: Fri, 16 Nov 2007 22:58:05 +0100 Message-ID: <1195250285.4012.6.camel@johannes.nop> Mime-Version: 1.0 X-Mailer: Evolution 2.12.1 (2.12.1-3.fc8) Content-Transfer-Encoding: 7bit Subject: Re: Question about superglobals From: johannes@php.net (Johannes =?ISO-8859-1?Q?Schl=FCter?=) Hi Sam, you could use pecl/runkit for registering your own super globals. See example 2071 on http://de3.php.net/manual/en/ref.runkit.php johannes On Fri, 2007-11-16 at 15:53 -0500, Sam Barrow wrote: > I am trying to develop a patch for personal use to enable custom > superglobals. > > I seemed to have had it working, but am I allowed to specify > superglobals in my script, or do they have to be specified in an ini > file or statically in the PHP code? > > I created a superglobal keyword and a function that calls > zend_register_auto_global upon the use of this keyword, but it doesn't > work. It calls zend_register_auto_global correctly and passes the > variable name and length of the variable name, but when i try to access > the variable inside a function in my PHP script, it is undefined. > However I am able to hard code my superglobal into the PHP source files > and it works. > > Is there some type of restriction on setting superglobals at runtime, or > does the structure of the PHP interpreter not allow this, or am I doing > something wrong? > > Thanks in advanced for your help.