2013-01-25 19:13:33 +04:00
|
|
|
<?php
|
2013-02-07 17:37:16 +04:00
|
|
|
require_once __DIR__.'/scripts/bootstrap.php';
|
|
|
|
exec("rm -rf ".__DIR__."/compile/*");
|
2013-01-25 19:13:33 +04:00
|
|
|
|
2013-06-28 11:53:53 +04:00
|
|
|
echo "Smarty3 vs Twig vs Fenom\n\n";
|
2013-01-25 19:13:33 +04:00
|
|
|
|
|
|
|
echo "Generate templates... ";
|
|
|
|
passthru("php ".__DIR__."/templates/inheritance/smarty.gen.php");
|
|
|
|
passthru("php ".__DIR__."/templates/inheritance/twig.gen.php");
|
|
|
|
echo "Done\n";
|
|
|
|
|
2013-02-07 17:37:16 +04:00
|
|
|
echo "Testing a lot output...\n";
|
|
|
|
|
2013-05-17 22:20:29 +04:00
|
|
|
Benchmark::runs("smarty3", 'echo/smarty.tpl', __DIR__.'/templates/echo/data.json');
|
|
|
|
Benchmark::runs("twig", 'echo/twig.tpl', __DIR__.'/templates/echo/data.json');
|
2013-06-28 11:53:53 +04:00
|
|
|
Benchmark::runs("fenom", 'echo/smarty.tpl', __DIR__.'/templates/echo/data.json');
|
2013-07-02 11:07:33 +04:00
|
|
|
//if(extension_loaded("phalcon")) {
|
|
|
|
// Benchmark::runs("volt", 'echo/twig.tpl', __DIR__.'/templates/echo/data.json');
|
|
|
|
//}
|
2013-01-25 19:13:33 +04:00
|
|
|
|
|
|
|
echo "\nTesting 'foreach' of big array...\n";
|
2013-02-07 17:37:16 +04:00
|
|
|
|
|
|
|
Benchmark::runs("smarty3", 'foreach/smarty.tpl', __DIR__.'/templates/foreach/data.json');
|
2013-05-17 22:20:29 +04:00
|
|
|
Benchmark::runs("twig", 'foreach/twig.tpl', __DIR__.'/templates/foreach/data.json');
|
2013-06-28 11:53:53 +04:00
|
|
|
Benchmark::runs("fenom", 'foreach/smarty.tpl', __DIR__.'/templates/foreach/data.json');
|
2013-07-02 11:07:33 +04:00
|
|
|
//if(extension_loaded("phalcon")) {
|
|
|
|
// Benchmark::runs("volt", 'foreach/twig.tpl', __DIR__.'/templates/foreach/data.json');
|
|
|
|
//}
|
2013-01-25 19:13:33 +04:00
|
|
|
|
|
|
|
echo "\nTesting deep 'inheritance'...\n";
|
2013-02-07 17:37:16 +04:00
|
|
|
|
|
|
|
Benchmark::runs("smarty3", 'inheritance/smarty/b100.tpl', __DIR__.'/templates/foreach/data.json');
|
2013-04-22 10:15:14 +04:00
|
|
|
Benchmark::runs("twig", 'inheritance/twig/b100.tpl', __DIR__.'/templates/foreach/data.json');
|
2013-06-28 11:53:53 +04:00
|
|
|
Benchmark::runs("fenom", 'inheritance/smarty/b100.tpl', __DIR__.'/templates/foreach/data.json');
|
2013-07-02 11:07:33 +04:00
|
|
|
//if(extension_loaded("phalcon")) {
|
|
|
|
// Benchmark::runs("volt", 'inheritance/twig/b100.tpl', __DIR__.'/templates/foreach/data.json');
|
|
|
|
//}
|
2013-01-25 19:13:33 +04:00
|
|
|
|
|
|
|
echo "\nDone. Cleanup.\n";
|
2013-03-14 21:45:00 +04:00
|
|
|
//passthru("rm -rf ".__DIR__."/compile/*");
|
2013-01-25 19:13:33 +04:00
|
|
|
passthru("rm -f ".__DIR__."/templates/inheritance/smarty/*");
|
|
|
|
passthru("rm -f ".__DIR__."/templates/inheritance/twig/*");
|
|
|
|
|
2013-06-28 11:53:53 +04:00
|
|
|
echo "\nSmarty3 vs Fenom (more details)\n\n";
|
2013-01-25 19:13:33 +04:00
|
|
|
|
|
|
|
echo "Coming soon\n";
|