mirror of
https://github.com/phpv8/v8js.git
synced 2024-11-08 16:48:40 +00:00
Create README.md
Missing quotes
This commit is contained in:
parent
0ba22efb38
commit
a626cbc8b2
@ -376,7 +376,7 @@ you need to remove all extension registrations.
|
|||||||
Now an simple example on how to use snapshots:
|
Now an simple example on how to use snapshots:
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$snapshot = V8Js::createSnapshot(var fibonacci = n => n < 3 ? 1 : fibonacci(n - 1) + fibonacci(n - 2));
|
$snapshot = V8Js::createSnapshot('var fibonacci = n => n < 3 ? 1 : fibonacci(n - 1) + fibonacci(n - 2)');
|
||||||
$jscript = new V8Js('php', array(), array(), true, $snapshot);
|
$jscript = new V8Js('php', array(), array(), true, $snapshot);
|
||||||
echo $jscript->executeString('fibonacci(43)') . "\n";
|
echo $jscript->executeString('fibonacci(43)') . "\n";
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user