Re: Funny ;)
I think, we need php in client side (WebBrowser) like as JavaScript or VBScript, let us name it as PHPScript
I'm almost finished with an alpha release of this.
The PHPScript interpreter is written in JavaScript and imports the PHP source files via XMLHttpRequest/ActiveX-XMLHTTP (synchronously though).
There are four main steps:
1. The Main file loads and calls phpScript.js.
2. phpScript.js instantiates an interpreter object and fetches the PHPScript file (.phps).
3. From here, the interpreter processes the script (rendering the markup in one pass).
4. Finally, the output is sent to the DOM via the BODY tag's innerHTML property (doing this with W3C DOM methods is just too much to deal with).
As of now, I only have about 15% of PHP 4's functions implemented?at least that's a start. I don't think PHPScript will have decent database support any time soon though (sorry about that).
It's important to note that "viewing source" will not show the rendered output or your source files since the elements are written to the DOM via JavaScript. But you can't rely on this to protect your source files; the unprocessed scripts are sent to the client before the PHPScript interpreter processes it.
Remember: PHPScript is client-side scripting. The unprocessed scripts are stored in the user's browser cache. So simply looking in the cache folder reveals your source code. So be careful what you put in there.
TemplarPHP - A cascading template framework for PHP.