Showing posts with label PHP. Show all posts
Showing posts with label PHP. Show all posts
Thursday, June 11, 2009
Command line for Quercus project - Php in Java
Quercus is a mature industry oriented platform for PHP/Java solutions. Well, it is around for a few years, has a rich PHP modules support, and is claimed to be faster then mod_php, because of compiled bytecode, cache management, etc.
Unfortunately that beast is primary targeted to support web applications only under Resin werbser. But with closer look, it turns out that not only the webserver presense is not required, but you can actually run it from command line. I have recently added this pet project - an ad hoc to support detached functionality of this nice PHP in Java implementaiton.
All the feedback is welcomed. Future plans are to do a lot of testing, properly mimic php-cli behaivor, implement CGI support.
PS
Alternative projects are ProjectZero and Faun. The last one is also my lovely pet ;)
Unfortunately that beast is primary targeted to support web applications only under Resin werbser. But with closer look, it turns out that not only the webserver presense is not required, but you can actually run it from command line. I have recently added this pet project - an ad hoc to support detached functionality of this nice PHP in Java implementaiton.
All the feedback is welcomed. Future plans are to do a lot of testing, properly mimic php-cli behaivor, implement CGI support.
PS
Alternative projects are ProjectZero and Faun. The last one is also my lovely pet ;)
Wednesday, May 27, 2009
Lambda Templates
I have just putted this piece of code into the repository together with small wiki article.
LambdaTemplates
Building a very trivial tool for programmable templates support
Background
Examples
Grammar will be something like
expression := body | LAMBDA (argument COMMA)* DOT body;
body := CHAR*;
$p = new LambdaTemplates();
$p->setVar('x','10');
$p->setVar('what is x','/x.is /x = x?');
echo $p->processTemplate('question: %what is x%');
$p = new LambdaTemplates();
$p->setVar('titel','herr');
$p->setVar('name','y.y.');
$p->setVar('titelname','/titel,name.titel name');
echo $p->processTemplate('question: %titelname%');
Global scope
Subscribe to:
Posts (Atom)