Another thing I'd like to see is a native oo interface
for this extension. I've attached an php code example
of how such an interface would look (The extensions in
there can be disregarded).
eg:
<?php
$t = new tmpl();
$t->open('test.tpl');
$t->set_global('random', mt_rand());
for ($i = 0; $i < 4; $i++) {
$t->iterate('/row');
$t->set('/row', array('one' => '1', 'two' => '2'));
}
echo $t->parse();
?>
Regards, Sjon
php code of oo interface
Logged In: NO
Why would you do this in c? Why not write a simple class (as
I have done) in php?
Logged In: YES
user_id=217316
>Sender: nobody
>Logged In: NO
>Why would you do this in c? Why not write a simple class (as
>I have done) in php?
reason is simple: think of speed
anyway, i think that parallell implementation in pure php
would be handy for cases, where you have no access or powers
to force web server admin into installing a C extension