Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Symfony Finland:
It's time to get creative with the Symfony Expression Language
Mar 21, 2016 @ 10:39:23

On the Symfony Finland site there's a post encouraging you to "get expressive" with the Symfony Expression Language. The Symfony Expression Language is a part of a component in the Symfony framework that allows for custom evaluation and action in the form of a specially formatted string.

Way back in November 2014 the Symfony team introduced the ExpressionLanguage component. It is essentially a simplified version of control structures that you use in the Twig templating language, producing a single value in the end.

The feature has a number of uses, but seems to be under utilized by the Symfony and PHP communities - especially in higher level functionalities. [...] I think there is a lot of room for developers to adopt the component in many different functionalities, not only for routing, access control and so on.

The post goes on to talk about expression languages in general and how they're present in other languages too (like Java with JUEL). He then shares a basic example evaluating the data in an array and getting back a pass/fail result.

tagged: symfony expression language tutorial introduction juel java

Link: https://www.symfony.fi/entry/its-time-to-get-creative-with-the-symfony-expression-language