Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<V8Js::__constructV8Js::getExtensions>
^V8JsLast updated: Mon, 26 Oct 2026

V8Js::executeString

(PECL v8js >= 0.1.0)

V8Js::executeString — Execute a string as Javascript code

Description

public function V8Js::executeString(string $script, string $identifier = "V8Js::executeString()", int $flags = V8Js::FLAG_NONE): mixed

Compiles and executes the string passed with script as Javascript code.

Parameters

script

The code string to be executed.

identifier

Identifier string for the executed code. Used for debugging.

flags

Execution flags. This value must be one of the V8Js::FLAG_* constants, defaulting to V8Js::FLAG_NONE.

Return Values

Returns the last variable instantiated in the Javascript code converted to matching PHP variable type.


<V8Js::__constructV8Js::getExtensions>
^V8JsLast updated: Mon, 26 Oct 2026