Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:46480 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 43623 invoked from network); 21 Dec 2009 14:31:04 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Dec 2009 14:31:04 -0000 Authentication-Results: pb1.pair.com smtp.mail=rob_nicholson@uk.ibm.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=rob_nicholson@uk.ibm.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain uk.ibm.com designates 194.196.100.162 as permitted sender) X-PHP-List-Original-Sender: rob_nicholson@uk.ibm.com X-Host-Fingerprint: 194.196.100.162 mtagate2.uk.ibm.com Linux 2.5 (sometimes 2.4) (4) Received: from [194.196.100.162] ([194.196.100.162:50895] helo=mtagate2.uk.ibm.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EF/14-20736-6A68F2B4 for ; Mon, 21 Dec 2009 09:31:02 -0500 Received: from d06nrmr1407.portsmouth.uk.ibm.com (d06nrmr1407.portsmouth.uk.ibm.com [9.149.38.185]) by mtagate2.uk.ibm.com (8.13.1/8.13.1) with ESMTP id nBLEUxvo011423 for ; Mon, 21 Dec 2009 14:30:59 GMT Received: from d06av02.portsmouth.uk.ibm.com (d06av02.portsmouth.uk.ibm.com [9.149.37.228]) by d06nrmr1407.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id nBLEUxvc868420 for ; Mon, 21 Dec 2009 14:30:59 GMT Received: from d06av02.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av02.portsmouth.uk.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id nBLEUx6F002303 for ; Mon, 21 Dec 2009 14:30:59 GMT Received: from d06ml069.portsmouth.uk.ibm.com (d06ml069.portsmouth.uk.ibm.com [9.149.38.218]) by d06av02.portsmouth.uk.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id nBLEUxsN002295 for ; Mon, 21 Dec 2009 14:30:59 GMT In-Reply-To: References: X-KeepSent: 4DDF668B:4469E2F4-80257693:004E10F1; type=4; name=$KeepSent To: Christian Grobmeier Cc: internals@lists.php.net X-Mailer: Lotus Notes Release 8.5.1 September 28, 2009 Message-ID: Date: Mon, 21 Dec 2009 14:27:02 +0000 X-MIMETrack: Serialize by Router on D06ML069/06/M/IBM(Release 8.0.2FP2|June 22, 2009) at 21/12/2009 14:34:12 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Subject: Re: [PHP-DEV] How does the interpreter work From: rob_nicholson@uk.ibm.com (Rob Nicholson) Christian Grobmeier wrote on 21/12/2009 13:56:08: > I would like to learn more about how the interpreter works, but I was > unable to find good documents on the web. Basically I am thinking on > something about allocation of variables, how does object creation work > and such stuff. Maybe something on the overall architecture of PHP > would be of interest too. > > In java world there is the JVM specification, I hoped there is > something for PHP too. Hi Christian, The PHP architecture is a little different from the JVM in that it does not explicitly document/specify the interface between the compiler and the bytecode/opcode interpreter the way that Java does. It still exists though. I suggest you look at the links under here: http://www.php.net/manual/en/internals2.php In particular: http://www.php.net/manual/en/internals2.opcodes.php Another good reference is Sara Goleman's book "Extending and Embedding PHP" Andy Wharmby produced a set of charts which you can find on Zoe's Blog here : http://zoomsplatter.blogspot.com/2008/08/php-opcodes.html . These may help you to make a fast start understanding the overall design. Rob.