| title | Getting Started |
|---|---|
| parent | PHP |
| nav_order | 1 |
| layout | default |
{: .no_toc }
{: .no_toc .text-delta }
- TOC {:toc}
You can install the package via composer:
composer require php-script/php-scriptuse 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();
}