(PHP Hypertext Preprocessor) Preprocessor
MIT License
Note: This is an extremally super mega alpha project, don't use it in production yet!
Because I had free time.
#keyword shape class
#keyword shared public
#keyword fn function
#keyword entry __construct
#keyword say echo
#keyword foo php
<?foo
shape Main {
shared fn entry()
{
say "Don't use it.";
}
}
Translates to:
<?php
class Main {
public function __construct() {
echo "Don't use it.";
}
}
About 30 minutes (?).
What a shame. Don't tell anybody about that!
It is a small PHP preprocessor, currently able to preprocess only keywords, by usage of directive:
#keyword mapFrom mapTo
Yes, you can fuck with your friends code:
#keyword true false
Call, by command line, the file PHPP.php
passing your file as argument. You can do that:
php PHPP.php main.phpp > main.php