dismiss Step into the future! Click here to switch to the beta php.net site
downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

V8Js> <Resource Types
[edit] Last updated: Fri, 28 Jun 2013

view this page in

Examples

Basic usage

Example #1 Basic Javascript execution

<?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);
}

?>

The above example will output:

Hello World!
int(13)


add a note add a note User Contributed Notes Examples - [0 notes]
There are no user contributed notes for this page.

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