File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
components/expression_language Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -51,10 +51,10 @@ Using Parsed and Serialized Expressions
5151Both ``evaluate() `` and ``compile() `` can handle ``ParsedExpression `` and
5252``SerializedParsedExpression ``::
5353
54- use Symfony\Component\ExpressionLanguage\ParsedExpression;
5554 // ...
5655
57- $expression = new ParsedExpression($language->parse('1 + 4'));
56+ // the parse() method returns a ParsedExpression
57+ $expression = $language->parse('1 + 4', array());
5858
5959 echo $language->evaluate($expression); // prints 5
6060
@@ -64,7 +64,7 @@ Both ``evaluate()`` and ``compile()`` can handle ``ParsedExpression`` and
6464 // ...
6565
6666 $expression = new SerializedParsedExpression(
67- serialize($language->parse('1 + 4'))
67+ serialize($language->parse('1 + 4', array() ))
6868 );
6969
7070 echo $language->evaluate($expression); // prints 5
You can’t perform that action at this time.
0 commit comments