I've write a sophisticate system in php5 (many classes which use static method and can include other files)

Now I wish to distribuite that ant i'd pick the module way, so i love to produce a module like myFramework.so and can include it in Apache (maybe) and after, after i write some php application, I'll use method and/or classes.

Now i write

<?php
include("myFramework.php");
myClass::callMymethod();
?>

The issue is I will not to talk about my source code and that i don't believe that obfuscation of code is the foremost way, so, i favor to produce a module put together but i'm not sure :

1 - if is it feasible 2 - if so, what's the ways 3 - other

I whant to achieve that

<?php
myClass::callMymethod();
?>

with no use autoinclude, i wont to safeguard my code, i observe that basically include curl module or mysql lib, I'm able to use function for, the way i can make by using my framework?

No, you can't compile a PHP class into an Apache module. You might have the ability to rewrite it as being a PHP extension, but which will effectively involve repairing your code on your own in C -- you can't simply convert PHP for an extension.

You'll most likely have better luck utilizing a PHP encoder (e.g, Ioncube or Zend Guard) with this task.

Have a look at hiphop:

Developed at Facebook, and project / code located on Github. Will convert code into C++, it is dependent on what you're attempting to achieve, if it's safeguarding you intellectual property I'd accept duskwuff, Ioncube or ZG.

Worth observing is the fact that once converted with hiphop, it makes sense not run being an Apache module but instead utilizing a proprietary server also written at Facebook well from things i read to date.