From: fabien Date: Mon, 14 Dec 2009 19:23:55 +0000 (+0000) Subject: added operator precedence in the doc X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=1357acf979a95f4095737df839f969ed0b168d1e;p=konrad%2Ftwig.git added operator precedence in the doc git-svn-id: http://svn.twig-project.org/trunk@183 93ef8e89-cb99-4229-a87c-7fa0fa45744b --- diff --git a/doc/02-Twig-for-Template-Designers.markdown b/doc/02-Twig-for-Template-Designers.markdown index 16047ed..83ce5bb 100644 --- a/doc/02-Twig-for-Template-Designers.markdown +++ b/doc/02-Twig-for-Template-Designers.markdown @@ -684,6 +684,10 @@ Twig allows basic expressions everywhere. These work very similar to regular PHP and even if you're not working with PHP you should feel comfortable with it. +The operator precedence is as follows, with the lowest-precedence operators +listed first: `or`, `and`, `==`, `!=`, `<`, `>`, `>=`, `<=`, `in`, `+`, `-`, +`~`, `*`, `/`, `%`, `//`, `not`, and `[`. + ### Literals The simplest form of expressions are literals. Literals are representations