We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e506f01 commit 0725a8bCopy full SHA for 0725a8b
components/expression_language/syntax.rst
@@ -81,6 +81,24 @@ JavaScript::
81
82
This will print ``Hi Hi Hi!``.
83
84
+.. _component-expression-functions:
85
+
86
+Working with Functions
87
+----------------------
88
89
+You can also use registered functions in the expression by using the same
90
+syntax as PHP and JavaScript. The ExpressionLanguage component comes with one
91
+function by default: ``constant()`` Which will return the value of the PHP
92
+constant::
93
94
+ define('DB_USER', 'root');
95
96
+ echo $language->evaluate(
97
+ 'constant("DB_USER")'
98
+ );
99
100
+This will print ``root``.
101
102
.. _component-expression-arrays:
103
104
Working with Arrays
0 commit comments