How low level is this code? Does the byte code break classes into functions and expand member variables into globals, etc?
I would think an interpreter would be easier to implement working on lower level byte code as opposed to working on higher level abstractions like classes, etc???
Anyone have any idea? Any resources?
PHP byte code?
Moderator: General Moderators
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
Re: PHP byte code?
http://pecl.php.net/package/vld would be your best resource.
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
Re: PHP byte code?
Thanks. I read that already.
I read several other resources on the topic of byte code as well. Seems my speculation was right all along. Byte code is essentially a binary version of source code. That is constructs like classes, etc still exist. Apparently they do even in machine code but slightly more low level.
Ideally what I wanted to happened was for class hierarchies to essentially be expanded, functions inlined, classes converted into globals, etc...
PHP being a dynamic language makes expanding classes (or their hierarchies) difficult although I still haven't accepted impossible.
In the next couple weeks I want to start work on a PHP based parser, syntax tree, etc...eventually test my theories until I've proven myself wrong.
Cheers
I read several other resources on the topic of byte code as well. Seems my speculation was right all along. Byte code is essentially a binary version of source code. That is constructs like classes, etc still exist. Apparently they do even in machine code but slightly more low level.
Ideally what I wanted to happened was for class hierarchies to essentially be expanded, functions inlined, classes converted into globals, etc...
PHP being a dynamic language makes expanding classes (or their hierarchies) difficult although I still haven't accepted impossible.
In the next couple weeks I want to start work on a PHP based parser, syntax tree, etc...eventually test my theories until I've proven myself wrong.
Cheers