mirror of
https://github.com/phpv8/v8js.git
synced 2024-12-23 04:51:53 +00:00
25 lines
389 B
Plaintext
25 lines
389 B
Plaintext
|
--TEST--
|
||
|
Test V8::executeString() : Calling construct twice
|
||
|
--SKIPIF--
|
||
|
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
|
||
|
--FILE--
|
||
|
<?php
|
||
|
|
||
|
$JS = <<< EOT
|
||
|
print('Hello' + ' ' + 'World!' + "\\n");
|
||
|
EOT;
|
||
|
|
||
|
$v8 = new V8Js("myObj");
|
||
|
$v8->__construct();
|
||
|
|
||
|
try {
|
||
|
$v8->executeString($JS, 'basic.js');
|
||
|
} catch (V8JsException $e) {
|
||
|
var_dump($e);
|
||
|
}
|
||
|
?>
|
||
|
===EOF===
|
||
|
--EXPECT--
|
||
|
Hello World!
|
||
|
===EOF===
|