PHP byte code?

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

PHP byte code?

Post by alex.barylski »

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?
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Re: PHP byte code?

Post by Weirdan »

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?

Post by alex.barylski »

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. :P

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. :offtopic: :drunk:

Cheers :)
Post Reply