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