compiling php

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
phpScott
DevNet Resident
Posts: 1206
Joined: Wed Oct 09, 2002 6:51 pm
Location: Keele, U.K.

compiling php

Post by phpScott »

I have recently heard that it is not possible to compile php code to be native code, security and speed seem to be the main reasons why.

I tried doing some searching and only found comercial products that explain why you want to and here is the product to do so.

Roadsend is one company I found http://www.roadsend.com/home/index.php?pageID=compiler
Compiling PHP to native machine code produces faster, more efficient, more stable products for your own use or for sale to your clients.
Any thoughts or suggestions where I can find more information about this.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

more information like what? We've talked about Roadsend before: [devnet]Roadsend[/devnet]
User avatar
phpScott
DevNet Resident
Posts: 1206
Joined: Wed Oct 09, 2002 6:51 pm
Location: Keele, U.K.

roadsend

Post by phpScott »

I read the roadsend site. tried searching for compiling here but only got responses about compiling php with apache and the like. What I want to know is it worth while to consider compiling php code onto a apache server, worth the time and investment. Is there the open source linux flavour yet.
General opinions on whether it is worth it for web site development.

Thanks.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

I'm fairly doubtful of seeing a linux OSS version soon.. It can be worth it, IF you need execution to be as fast as they can translate the php into byte code.. I'm somewhat doubtful of their ability to create high-speed versions of code when compared to ones written in C doing the same things. So my recommendation is, if you need the speed maximized, write it in C natively. No round about crap, it'll generally bite you in the ass as that will likely be your bottleneck.

You could go a step further and use Assembly. However, since experience is critical to getting asm to run real fast, it's probably better to use a really good optimizing C compiler.
Post Reply