mirror of
https://github.com/phpv8/v8js.git
synced 2025-01-03 10:21:51 +00:00
Syntax highlight API stuff
This commit is contained in:
parent
30119a877a
commit
a9d7dbda45
@ -77,6 +77,7 @@ sudo make install
|
|||||||
PHP API
|
PHP API
|
||||||
=======
|
=======
|
||||||
|
|
||||||
|
```php
|
||||||
class V8Js
|
class V8Js
|
||||||
{
|
{
|
||||||
/* Constants */
|
/* Constants */
|
||||||
@ -149,10 +150,12 @@ PHP API
|
|||||||
final class V8JsMemoryLimitException extends Exception
|
final class V8JsMemoryLimitException extends Exception
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
```
|
||||||
|
|
||||||
Javascript API
|
Javascript API
|
||||||
==============
|
==============
|
||||||
|
|
||||||
|
```js
|
||||||
// Print a string.
|
// Print a string.
|
||||||
print(string);
|
print(string);
|
||||||
|
|
||||||
@ -165,6 +168,7 @@ Javascript API
|
|||||||
// CommonJS Module support to require external code.
|
// CommonJS Module support to require external code.
|
||||||
// This makes use of the PHP module loader provided via V8Js::setModuleLoader (see PHP API above).
|
// This makes use of the PHP module loader provided via V8Js::setModuleLoader (see PHP API above).
|
||||||
require("path/to/module");
|
require("path/to/module");
|
||||||
|
```
|
||||||
|
|
||||||
The JavaScript `in` operator, when applied to a wrapped PHP object,
|
The JavaScript `in` operator, when applied to a wrapped PHP object,
|
||||||
works the same as the PHP `isset()` function. Similarly, when applied
|
works the same as the PHP `isset()` function. Similarly, when applied
|
||||||
|
Loading…
Reference in New Issue
Block a user