iamluc/script

dev-master 2019-05-24 14:00 UTC

This package is auto-updated.

Last update: 2024-10-25 06:58:15 UTC


README

Script is a PHP library for parsing and executing Lua-like scripts.

Example

<?php

$parser = new \Iamluc\Script\Parser();
$sandbox = new \Iamluc\Script\Sandbox();

$script = <<<EOS
print([[Hello "cruel" world !!]])
EOS;

$sandbox->eval($parser->parse($script));
echo $sandbox->getOutput();

License

MIT