downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

V8Js> <リソース型
[edit] Last updated: Fri, 25 May 2012

view this page in

基本的な使用例

例1 基本的な Javascript の実行

<?php

$v8 
= new V8Js();

/* basic.js */
$JS = <<< EOT
len = print('Hello' + ' ' + 'World!' + "\\n");
len;
EOT;

try {
  
var_dump($v8->executeString($JS'basic.js'));
} catch (
V8JsException $e) {
  
var_dump($e);
}

?>

上の例の出力は以下となります。

Hello World!
int(13)


add a note add a note User Contributed Notes
There are no user contributed notes for this page.

 
show source | credits | sitemap | contact | advertising | mirror sites