Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:15535 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 37690 invoked by uid 1010); 22 Mar 2005 11:20:15 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 37675 invoked from network); 22 Mar 2005 11:20:15 -0000 Received: from unknown (HELO zend.com) (127.0.0.1) by localhost with SMTP; 22 Mar 2005 11:20:15 -0000 X-Host-Fingerprint: 80.74.107.235 mail.zend.com Linux 2.5 (sometimes 2.4) (4) Received: from ([80.74.107.235:42444] helo=mail.zend.com) by pb1.pair.com (ecelerity HEAD r(5268)) with SMTP id AF/36-36163-D6FFF324 for ; Tue, 22 Mar 2005 06:20:14 -0500 Received: (qmail 16108 invoked from network); 22 Mar 2005 11:20:10 -0000 Received: from localhost (HELO zeev-notebook.zend.com) (127.0.0.1) by localhost with SMTP; 22 Mar 2005 11:20:10 -0000 Message-ID: <5.1.0.14.2.20050322123101.0870b910@localhost> X-Sender: zeev@localhost X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Tue, 22 Mar 2005 13:20:10 +0200 To: Arjun Jain Cc: php-dev In-Reply-To: <423FC314.5060801@picorp.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: Re: [PHP-DEV] PHP auto global variables inside C extension From: zeev@zend.com (Zeev Suraski) References: <423FC314.5060801@picorp.com> At 09:02 22/03/2005, Arjun Jain wrote: >Hi everyone, > >I was wondering if there was any way in which the PHP auto global >variables could be used inside the C extension code? Where does php store >all the global variables? It stores them in the globals hash table. Take a look at php_session_start() in ext/session/session.c, and look for "_COOKIE", for an example of how you can access these. Once you have a reference to the $_FILES hash, you can iterate it to get each file (which is also a hash), and then lookup each element to obtain its value. Zeev