mirror of
https://github.com/phpv8/v8js.git
synced 2024-11-15 03:58:42 +00:00
f6a6d1e4b5
Use the NamedPropertyHandler feature of v8 to wrap accesses to PHP properties and methods from JavaScript. This enables us to support property set/delete/query. The `in` and `delete` operators in JavaScript work like the `isset()` and `unset()` functions in PHP. In particular, a PHP property with a null value will not be `in` the JavaScript object. (This holds when enumerating all properties of an object as well.) Because JavaScript has a single namespace for both properties and methods, we allow the use of the `__call` method on a PHP object (even if the PHP class does not natively define the `__call` magic function) in order to unambiguously invoke a method. Similarly, you can prefix a property name with `$` to unambiguously access the property. (When enumerating all properties, properties are `$`-prefixed in order to ensure they are not conflated with method names.)
7 lines
297 B
Plaintext
7 lines
297 B
Plaintext
- Feature: Extension registering from php.ini
|
|
- Feature: Thread safety
|
|
- Missing: Indexed property handlers
|
|
- Missing: static properties of PHP objects (on instance.constructor?)
|
|
- Bug: exception propagation fails when property getter is set
|
|
- Bug: method_exists() leaks when used with V8 objects
|