Hip-Hop for PHP
Since this is purely hypothetical and you don't really have any intention of changing... I'll throw this answer in the direction of another option you could take.
Take a look at HPHP. Hip-Hop for PHP. Take a read of this. http://developers.facebook.com/news.php?story=358&blog=1
You can download HipHop and then translate and compile your PHP scripts to optimised C++ code, from here : http://github.com/facebook/hiphop-php
What is Hip-Hop?
Essentially : It is a PHP compiler that translates PHP code to C++ code. Then using something like g++ you can compile it to native binaries. Which once used as a replacement for lets say a LAMP stack, will save time and CPU.
Here is a quote from Haiping (who I believe is creditted as the project leader along with Scott and Dave.)
How HipHop Works
The main challenge of the project was
bridging the gap between PHP and C++.
PHP is a scripting language with
dynamic, weak typing. C++ is a
compiled language with static typing.
While PHP allows you to write magical
dynamic features, most PHP is
relatively straightforward. It's more
likely that you see if (...) {...}
else {..} than it is to see function
foo($x) { include $x; }. This is where
we gain in performance. Whenever
possible our generated code uses
static binding for functions and
variables. We also use type inference
to pick the most specific type
possible for our variables and thus
save memory.
The transformation process includes
three main steps:
Static analysis where we collect
information on who declares what and
dependencies,
Type inference where we choose the
most specific type between C++
scalars, String, Array, classes,
Object, and Variant, and
Code generation which for the most
part is a direct correspondence from
PHP statements and expressions to C++
statements and expressions.