0
0
mirror of https://github.com/phpv8/v8js.git synced 2024-11-09 23:08:41 +00:00
Commit Graph

4 Commits

Author SHA1 Message Date
Jan-E
c87ddb8ebf Fix tests for added method DateTime::createFromImmutable() 2018-07-05 11:45:03 +02:00
Stefan Siegl
edb4679223 Adapt var_dump test new php versions.
Newer versions of PHP in 5.4 and 5.5 line add micro seconds
precision to datetime representations.
This adds a regular expression to ignore the .000000 suffix.
2014-09-21 19:49:24 +00:00
C. Scott Ananian
f6a6d1e4b5 Rework JavaScript wrapper for PHP objects.
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.)
2013-10-25 16:47:15 -04:00
C. Scott Ananian
27a140c9fb Bug fixes for JavaScript var_dump implementation (make it match PHP). 2013-10-25 14:18:56 -04:00