Hi,
I’ve been working with the z/OS Open Source version of PHP and found a behavior that is different then the previous version we’ve used. We commonly use PHP scripts to parse through the results of system commands at our shop for system checking and monitoring. One such example is a script that checks the available space in file systems. We’ll do something like this:
$dfcmd = “df -kP"
exec(”$dfcmd",$dfout,$dfrc);
foreach ($dfout as $df) {
#Check each filesystem
}
In the previous version of PHP the results from the command would result in $dfout being populated as an array with each output line as a separate array element. This allowed the following foreach loop to parse through the results. In the new version, $dfout is instead populated with a long string with the EOL characters included. Is this the desired behavior?
Thanks!