mirror of
https://github.com/phpv8/v8js.git
synced 2024-11-14 04:58:42 +00:00
22 lines
512 B
PHP
22 lines
512 B
PHP
--TEST--
|
|
Test V8::executeString() : Script validator test using compileString
|
|
--SKIPIF--
|
|
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
|
|
--FILE--
|
|
<?php
|
|
|
|
$v8 = new V8Js();
|
|
var_dump($v8->compileString('print("Hello World!");'));
|
|
|
|
try {
|
|
var_dump($v8->compileString('print("Hello World!);'));
|
|
} catch (V8JsScriptException $e) {
|
|
var_dump($e->getMessage());
|
|
}
|
|
?>
|
|
===EOF===
|
|
--EXPECTF--
|
|
resource(%d) of type (V8Js script)
|
|
string(62) "V8Js::compileString():1: SyntaxError: Unexpected token ILLEGAL"
|
|
===EOF===
|