phpv8 / v8js

V8 Javascript Engine for PHP — This PHP extension embeds the Google V8 Javascript Engine
http://pecl.php.net/package/v8js
MIT License
1.84k stars 200 forks source link

Properties from Objects missing #25

Closed upsala closed 11 years ago

upsala commented 11 years ago

As the following code shows there seems a few properties from the object missing. PHP returns '1'. V8 returns 'undefined'.

<?php

$script=<<<EOT var elements=PHP.dom.getElementsByTagName('node'); print(elements.length, "\n"); EOT;

$dom=new DomDocument(); $dom->loadXML('');

$elements=$dom->getElementsByTagName('node'); echo $elements->length, "\n";

$v8=new V8Js(); $v8->dom=$dom; $v8->executeString($script);

?>

cscott commented 11 years ago

Fixed in master (by pull request #62).

satoshi75nakamoto commented 11 years ago

I'm going to close this issue now.