views:

54

answers:

2

I'm not intrested in compiling for performance but in being able to "compile" a php script in order to carry it on a usb stick or portable hard drive.

I think that there may be two way:

1) Portable Apache 2) Portable command line php

I undersand that some package such as xampp and so on exists, as well as using the php bin files but I was wondering if something more user friendly exists, I mean something that I can just double click, open a browser and use.

Thank you very much.

+3  A: 

PHP is only interpreted. XAMPP merely sets up a mock environment with an apache server, a database, and the PHP engine. Unfortunately, XAMPP is about as fast and portable you're going to get in terms of being able to fire up a PHP app.

If you figure out a way to do it the way you're looking to - message me - I'll pay for it...

cinqoTimo
Well, there are PHP compilers. Thus I wouldn't say that it's merely interpreted ;)
nikic
There aren't any PHP compilers out there for general use - and there are no JIT compilers, period. This person is looking for a viable solution - not toys.
cinqoTimo
+2  A: 

searching THE WEB gives me this

PCC: http://code.roadsend.com/pcc/

and this

PHC: http://baheyeldin.com/technology/drupal/parrot-virtual-machine-pint-plumhead-phc-compiler-and-drupal.html

Two native PHP Compiler i found.

ITroubs
But as always, compiling an interpreted language that is supposed to run on a server is always a pretty much offshore.
ITroubs
The top link looks like they might be on to something if you're on Linux - the bottom one looks like the project is in process...
cinqoTimo
just a quick search on google for "php native compiler" ;-) no guarantee or any experience in that manner ;-)
ITroubs
Furthermore there is HipHop from Facebook ;)
nikic
funny here in their blog about HipHop they even refere to PPC and PHC http://developers.facebook.com/blog/post/358. but indeet HipHop could be an alternative too.
ITroubs