Skip to content

Commit eb7e0df

Browse files
committed
Create Hello World benchmark
0 parents  commit eb7e0df

File tree

5 files changed

+56
-0
lines changed

5 files changed

+56
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.idea/
2+
vendor/

README.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<p align="center">
2+
<img src="http://www.phpbenchmarks.com/images/logo_github.png">
3+
<br>
4+
<a href="http://www.phpbenchmarks.com" target="_blank">www.phpbenchmarks.com</a>
5+
</p>
6+
7+
## What is www.phpbenchmarks.com ?
8+
9+
You will find lot of benchmarks for PHP frameworks and template engines.
10+
11+
You can compare results between Apache Bench and Siege, and PHP 5.6 to 7.2.
12+
13+
## What is this repository ?
14+
15+
It's benchmark common code for Latte benchmarks.
16+
17+
Switch branch to select your Latte major version and benchmark you want to see.
18+
19+
See all Latte benchmarked versions on [phpbenchmarks/latte](https://github.com/phpbenchmarks/latte).
20+
21+
You can find how we benchmark on [phpbenchmarks.com](http://www.phpbenchmarks.com/en/benchmark-protocol.html).
22+
23+
## How versions works ?
24+
25+
We do not follow semantic version for this repository. Here is an explanation about our versioning system:
26+
27+
`X` related to Latte major version (`1` Latte ^1, `2` Latte ^2)
28+
29+
`Y` benchmark type (`1` Hello World)
30+
31+
`Z` new version, not just bugfix and could contains BC
32+
33+
## Benchmarks
34+
35+
You can find all Latte benchmarks results on [phpbenchmarks.com](http://www.phpbenchmarks.com/en/benchmark/latte.html).
36+
37+
Scores are too low ? Do not hesitate to create a pull request, and ask a new benchmark !

composer.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
2+
{
3+
"name": "phpbenchmarks/latte-common",
4+
"type": "project",
5+
"license": "proprietary",
6+
"require": {
7+
"latte/latte": "^2.0"
8+
}
9+
}

helloworld.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?php
2+
3+
$latte = (new Latte\Engine)
4+
->setTempDirectory($cacheDir)
5+
->setAutoRefresh(true);
6+
7+
$latte->render(__DIR__ . '/templates/hello-world.latte');

templates/hello-world.latte

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Hello World !

0 commit comments

Comments
 (0)