1. Go to this page and download the library: Download maximaster/evalue 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/ */
maximaster / evalue example snippets
use Maximaster\Evalue\Evalue;
// Create an Evalue instance with PHP code
$evalue = new Evalue('return $number * 2;');
// Run the code with context
$result = $evalue->run(['number' => 21]); // Returns 42
$evalue = new Evalue(
'return $greeting . " " . $name;',
['greeting' => 'Hello']
);
// Run with additional context
$result = $evalue->run(['name' => 'John']); // Returns "Hello John"