0
0
mirror of https://github.com/phpv8/v8js.git synced 2024-09-19 00:25:18 +00:00
Commit Graph

6 Commits

Author SHA1 Message Date
Albert
cb7b3dcc29 Optimize and fix test reference from @redbullmarky 2022-05-27 10:47:44 +08:00
Stefan Siegl
fcd78f830a
use EXPECTREGEX to handle different PHP version's output well 2019-06-23 19:09:12 +02:00
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