|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #58908 Variable is cleaned when use for second time
Submitted: 2009-10-21 05:03 UTC Modified: 2010-02-22 13:04 UTC
From: lycboy at gmail dot com Assigned: crobin (profile)
Status: Closed Package: spidermonkey (PECL)
PHP Version: 5.3.0 OS: Linux kernel 2.6.9 x86_64
Private report: No CVE-ID: None
 [2009-10-21 05:03 UTC] lycboy at gmail dot com
Use an variable for first time in JS, then the variable is cleaned.

Reproduce code:

function test($arr) {

$ctx = new JSContext();

$js = <<<JS
var arr = [1, null, 0, 'str'];
test(arr); // display nothing


Expected result:
It should export print_r() result two times.

Actual result:
only one print_r() result got when run the code above.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-02-20 15:33 UTC] c dot robin at smartphp dot org
That one is weird, it seems to happen only to objects ( using 
'var arr = 7' does display '77' ). I'll take a look into it.
 [2010-02-21 17:47 UTC] c dot robin at smartphp dot org
Ok so it looks like that when we store our stdClass in the 
intern->obj_ht HashTable, this same HashTable always return a 
NULL object when trying to retrieve it.
 [2010-02-22 13:04 UTC] c dot robin at smartphp dot org
This bug has been fixed in SVN.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on

In case this was a website problem, the change will show
up on the website in short time.
Thank you for the report, and for helping us make PECL better.

PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sun Jul 12 23:01:26 2020 UTC