Hi,

On Mon, 2009-12-21 at 14:56 +0100, Christian Grobmeier wrote:
> 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.

Well there's one quite complete document about it available - the source
code ;-) PHP isn't developed following standards but simply by
implementing and extending it. PHP is defined by the implementation ...

But: What exactly do you want to learn? Do you want to learn how to use
it better or "academic reasons" or something else? - Depending on all
that the focus of the learning might be quite different.

As a starting point for this I recently created a small toy project: A
minimal basic inspired language on top of the ZendVM, just 200 lines of
C code which might give a few pointers to do further research. It's
quite hackish ugly code but enough to compile and execute a script like
this:

10 GOTO 40
20 PRINT "B"
30 END
40 PRINT "A"
50 GOTO 20

This all will be compiled to Zend Opcodes which can be executed, cached
with APC, dumped by vld, ...

I hope I find the time to write the documentation around it, other than
that this code is absolutely useless :-)

http://github.com/johannes/pasic

johannes



-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to