|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2015-03-23 20:13 UTC] cmb@php.net
-Status: Open
+Status: Not a bug
[2015-03-23 20:13 UTC] cmb@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Sat Jan 24 07:00:01 2026 UTC |
Description: ------------ When you call ScriptControl.Reset, the script should be reset to its initial state. This is what happens for all other languages, but not PHPScript. Reproduce code: --------------- var sc = new ActiveXObject("ScriptControl"); sc.Language = "PHPScript"; sc.AddObject("WScript", WScript); sc.AddCode("function test() { $WScript->Echo('test'); } test();"); sc.Reset(); sc.AddCode("test();"); cscript /e:JScript thatfile.wsf Expected result: ---------------- The expected result is that it should print "test" then return an error indicating that test is undefined (Reset removed the test function). The PHPScript should function like the below JScript code: var sc = new ActiveXObject("ScriptControl"); sc.Language = "JScript"; sc.AddObject("WScript", WScript); sc.AddCode("function test() { WScript.Echo('test'); } test();"); sc.Reset(); sc.AddCode("test();"); cscript /e:JScript thatfile.wsf Actual result: -------------- In PHPScript, the Reset is ignored and so the output is: test test