Home
Examples
Downloads
FAQ
Documentation
Road Map
Forums
|
Getting Started
After reading this page, you should be able to start using J4P5 for your own PHP projects.
QuickStart:
(This assumes you already have php 5 installed and working on your system.)
- Unzip J4P5 somewhere under your web document tree. This should create a directory called "js" in the location you picked.
- Create a new php file in the same location, for example "test.php"
- Copy the following into the file:
<?php
include "js/js.php";
$script = <<<EOD
print("Hello from JavaScript<br>");
EOD;
js::run($script);
?>
- Save your file, and load it in your browser.
Notes:
The parser is extremely slow at this point. My Athlon 64 3200+ takes 4 full seconds of CPU time to parse anything.
the interpreter attempts to speed up the script execution by caching compiled scripts in a temporary directory.
You should now be ready to jump to the reference documentation. Too bad we don't have any yet.
|