« Back to Product

Documentation

IPS_GetScriptThreadList

 array IPS_GetScriptThreadList ()

Returns

An array of integer values with the IDs of all threads of the script engine. The order of the entries is not guaranteed.

Description

The function returns the IDs of all threads in which PHP scripts are executed. Without PHP support, the array is empty.

PHP scripts are executed in a fixed pool of threads. The number of threads is set by the special switch ThreadCount (default 50, at least 25), and the threads have the IDs 1 to ThreadCount. Within a script, the system variable $_IPS['THREAD'] contains the ID of the own thread.

IPS_GetScriptThread returns information about a thread.

Example

print_r(IPS_GetScriptThreadList());

/* e.g. returns:
Array
(
    [0] => 1
    [1] => 2
    [2] => 3
    etc. ...
)
*/
Any questions?