Skip to content
This repository was archived by the owner on Mar 29, 2024. It is now read-only.

Latest commit

 

History

History
39 lines (26 loc) · 825 Bytes

index.rst

File metadata and controls

39 lines (26 loc) · 825 Bytes

Welcome to php-v8's documentation!

About

php-v8 is a PHP 7.x extension that brings V8 JavaScript engine API to PHP with some abstraction in mind and provides an accurate native V8 C++ API implementation available from PHP.

Hello, world!

<?php

use V8\{Isolate, Context, StringValue, Script};

$script = "'Hello' + ', World!'";

$isolate = new Isolate();
$context = new Context($isolate);

echo (new Script($context, new StringValue($isolate, $script)))
    ->run($context)
    ->value(), PHP_EOL;

Content

.. toctree::
   :maxdepth: 2

   getting-started/index
   getting-started/performance-tricks
   development/index