|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-05-24 09:14 UTC] helly@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 07:00:01 2025 UTC |
This very well may be a problem with Windows XP instead of PHP... but if nothing else it should be documented: <?php system("C:\\PHP\\cli\\php -r 'exit(1);'", $retval); echo "$retval\n"; ?> On redhat, (of course, replacing the system call to the linux version of php-cli) this script echo's the return value as '1' which is the expected behavior. However, this same script ran in windows produces does not. Instead, it seems to be always return 254 regardless of the exit code. Please note that the above script has only been provided as an example of the problem -- it has been confirmed that system() and the -r argument are not causing this issue.