|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-02-20 15:33 UTC] c dot robin at smartphp dot org
[2010-02-21 17:47 UTC] c dot robin at smartphp dot org
[2010-02-22 13:04 UTC] c dot robin at smartphp dot org
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 23:00:02 2025 UTC |
Description: ------------ Use an variable for first time in JS, then the variable is cleaned. Reproduce code: --------------- <?php function test($arr) { print_r($arr); } $ctx = new JSContext(); $ctx->registerFunction('test'); $js = <<<JS var arr = [1, null, 0, 'str']; test(arr); test(arr); // display nothing JS; $ctx->evaluateScript($js); Expected result: ---------------- It should export print_r() result two times. Actual result: -------------- only one print_r() result got when run the code above.