generated from spatie/package-skeleton-php
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.php
More file actions
29 lines (21 loc) · 541 Bytes
/
app.php
File metadata and controls
29 lines (21 loc) · 541 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php
use Statix\Petals\TemplatingEngine;
// require the composer autoloader
require __DIR__.'/vendor/autoload.php';
// create a new instance of the templating engine
$engine = new TemplatingEngine(
templates: [
__DIR__.'/tests/templates',
],
cachePath: __DIR__.'/tests/cache',
// cache: false,
);
$engine->clearCache();
$start = microtime(true);
foreach (range(1, 100) as $item) {
$engine->render('echos', [
'name' => 'World',
]);
}
$end = microtime(true);
echo $end - $start . 's' . PHP_EOL;