Skip to content

Commit

Permalink
[ExpressionLanguage] Add more information about the min/max functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Javier Eguiluz committed Feb 5, 2024
1 parent f332fd8 commit 9388de6
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions reference/formats/expression_language.rst
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,10 @@ This will print out ``true``.
``min()`` function
~~~~~~~~~~~~~~~~~~

This function will return the lowest value::
This function will return the lowest value of the given parameters. You can pass
different types of parameters (e.g. dates, strings, numeric values) and even mix
them (e.g. pass numeric values and strings). Internally it uses the :phpfunction:`min`
PHP function to find the lowest value::

var_dump($expressionLanguage->evaluate(
'min(1, 2, 3)'
Expand All @@ -183,7 +186,10 @@ This will print out ``1``.
``max()`` function
~~~~~~~~~~~~~~~~~~

This function will return the highest value::
This function will return the highest value of the given parameters. You can pass
different types of parameters (e.g. dates, strings, numeric values) and even mix
them (e.g. pass numeric values and strings). Internally it uses the :phpfunction:`max`
PHP function to find the highest value::

var_dump($expressionLanguage->evaluate(
'max(1, 2, 3)'
Expand Down

0 comments on commit 9388de6

Please sign in to comment.