Getting Started
Table of contents
Installation
You can install the package via composer:
composer require php-script/php-script
Usage
Setting up the Engine
use PhpScript\Core\Engine;
$engine = new Engine;
// Optionally, set an execution time limit to prevent infinite loops
// $engine->setExecutionTimeLimit(5); // Script will time out after 5 seconds
try {
echo $engine->execute($phpScript);
} catch (Exception $exception) {
echo $exception->getMessage();
}