-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 7dd0ef2
Showing
5 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
.idea/ | ||
vendor/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<p align="center"> | ||
<img src="http://www.phpbenchmarks.com/images/logo_github.png"> | ||
<br> | ||
<a href="http://www.phpbenchmarks.com" target="_blank">www.phpbenchmarks.com</a> | ||
</p> | ||
|
||
## What is www.phpbenchmarks.com ? | ||
|
||
You will find lot of benchmarks for PHP frameworks and template engines. | ||
|
||
You can compare results between Apache Bench and Siege, and PHP 5.6 to 7.2. | ||
|
||
## What is this repository ? | ||
|
||
It's benchmark common code for Twig benchmarks. | ||
|
||
Switch branch to select your Twig major version and benchmark you want to see. | ||
|
||
See all Twig benchmarked versions on [phpbenchmarks/twig](https://github.com/phpbenchmarks/twig). | ||
|
||
You can find how we benchmark on [phpbenchmarks.com](http://www.phpbenchmarks.com/en/benchmark-protocol.html). | ||
|
||
## How versions works ? | ||
|
||
We do not follow semantic version for this repository. Here is an explanation about our versioning system: | ||
|
||
`X` related to Twig major version (`1` Twig ^1, `2` Twig ^2) | ||
|
||
`Y` benchmark type (`1` Hello World) | ||
|
||
`Z` new version, not just bugfix and could contains BC | ||
|
||
## Benchmarks | ||
|
||
You can find all Twig benchmarks results on [phpbenchmarks.com](http://www.phpbenchmarks.com/en/benchmark/twig.html). | ||
|
||
Scores are too low ? Do not hesitate to create a pull request, and ask a new benchmark ! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"name": "phpbenchmarks/twig-common", | ||
"type": "project", | ||
"license": "proprietary", | ||
"require": { | ||
"twig/twig": "^2.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?php | ||
|
||
$twig = new Twig_Environment( | ||
new Twig_Loader_Filesystem(__DIR__ . '/templates'), | ||
['cache' => $cacheDir] | ||
); | ||
|
||
echo $twig->render('helloworld.html.twig'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Hello World ! |