mirror of
https://github.com/phpv8/v8js.git
synced 2024-12-23 03:51:51 +00:00
26 lines
481 B
PHP
26 lines
481 B
PHP
--TEST--
|
|
Test V8Function::__call() : Check v8::TryCatch behaviour
|
|
--SKIPIF--
|
|
<?php
|
|
if(!function_exists('json_encode')) {
|
|
die('SKIP');
|
|
}
|
|
require_once(dirname(__FILE__) . '/skipif.inc');
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
$sandbox = new V8Js();
|
|
|
|
$cb = $sandbox->executeString('(function() { return oh; });');
|
|
|
|
try {
|
|
$cb();
|
|
} catch(\Exception $e) {
|
|
echo "caught: ".$e->getMessage()."\n";
|
|
}
|
|
?>
|
|
===EOF===
|
|
--EXPECT--
|
|
caught: V8Js::compileString():1: ReferenceError: oh is not defined
|
|
===EOF===
|