The difference between the php globals.txt and the perl one is that you'll want to use PHP code instead of Perl. You'll notice in globals.txt (globals.php in your copy), date and time have been replaced with PHP code equivalents. Another difference is that in the template, to call those 'subs', you call them by <?print $date()?> instead of <%date%>.
See README.php for more differences between the PHP and Perl front ends.
The PHP templates are essentially just PHP files. They can contain any PHP code you wish to put in it. For help with PHP syntax, see http://www.php.net/manual. Don't be fooled by the .html extensions , they are parsed by the PHP parser. The equivalent for <%if%> is <?if (statement) {?>stuff to print out<?} elseif (statement) {?>else print this stuff<?}?>.
This of course can be done differently. The <? ?>'s are for going into and out of PHP, and HTML mode for PHP's parser (see the PHP manual for more info), so technically you could do this:
Code:
<?if ($foo = "bar") { print "output goes here";
more PHP code here
} elseif ($foo = "baz") {
print "more output goes here";
} else {
print "even more output goes here";
}?>
Basically, anything you can do in PHP, you can put into the templates. Hope this helps.
Adrian