File tree 5 files changed +56
-0
lines changed
5 files changed +56
-0
lines changed Original file line number Diff line number Diff line change
1
+ .idea /
2
+ vendor /
Original file line number Diff line number Diff line change
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 Twig benchmarks.
16
+
17
+ Switch branch to select your Twig major version and benchmark you want to see.
18
+
19
+ See all Twig benchmarked versions on [ phpbenchmarks/twig] ( https://github.com/phpbenchmarks/twig ) .
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 Twig major version (` 1 ` Twig ^1, ` 2 ` Twig ^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 Twig benchmarks results on [ phpbenchmarks.com] ( http://www.phpbenchmarks.com/en/benchmark/twig.html ) .
36
+
37
+ Scores are too low ? Do not hesitate to create a pull request, and ask a new benchmark !
Original file line number Diff line number Diff line change
1
+ {
2
+ "name" : " phpbenchmarks/twig-common" ,
3
+ "type" : " project" ,
4
+ "license" : " proprietary" ,
5
+ "require" : {
6
+ "twig/twig" : " ^1.0"
7
+ }
8
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ $ twig = new Twig_Environment (
4
+ new Twig_Loader_Filesystem (__DIR__ . '/templates ' ),
5
+ ['cache ' => $ cacheDir ]
6
+ );
7
+
8
+ $ twig ->display ('helloworld.html.twig ' );
Original file line number Diff line number Diff line change
1
+ Hello World !
You can’t perform that action at this time.
0 commit comments