mirror of
https://github.com/phpv8/v8js.git
synced 2024-12-23 00:51:51 +00:00
10 lines
216 B
PHP
10 lines
216 B
PHP
<?php
|
|
|
|
$a = new V8Js();
|
|
|
|
try {
|
|
var_dump($a->executeString("date = new Date('September 8, 1975 09:00:00'); print(date + '\\n'); date;", "test.js"));
|
|
} catch (V8JsScriptException $e) {
|
|
echo $e->getMessage(), "\n";
|
|
}
|