boolean IPS_RunScriptTextEx (string $ScriptText, array $Parameter)
|ScriptText||String that is executed as script|
|Parameter||Key (string) => Value (variant) Pairs that can be accessed in the executed script|
|If the command succeeds, it returns TRUE, otherwise FALSE.|
The command starts a script with the content ScriptText. It is not necessary to state PHP tags.
When using IPS_RunScriptTextEx, the script is executed in its own context. Thus, it does not have access to the variables of the calling script except for the passed parameters. Additional data can only be exchanged via external variables. The command is suited for situations, where a script needs to be executed soon but does not require the context of the calling script. The runtime of the scripts do not change as both scripts are executed simultaneously.
The array Parameter can contain any number of "Key => Value" pairs (see PHP Arrays). Every pair appears in the called script as variable Key with the value Value.
// Prints "Hello World" in the message view IPS_RunScriptTextEx('echo $_IPS["start"] . " ". $_IPS["end"];', Array("start" => "Hello", "end" => "World"));