PHP code example of uuf6429 / expression-language-arrowfunc
1. Go to this page and download the library: Download uuf6429/expression-language-arrowfunc library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
uuf6429 / expression-language-arrowfunc example snippets
$language = new ExpressionLanguage();
$expression = '(value) -> { value > 20 }';
$filter = $language->evaluate($expression);
$values = array_filter([18, 23, 40], $filter);