php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #14747 Return exitcodes to shell ($?)
Submitted: 2001-12-28 16:39 UTC Modified: 2001-12-31 10:25 UTC
From: bernd dot herbold at gmx dot de Assigned:
Status: Closed Package: Feature/Change Request
PHP Version: 4.0.6 OS: Windows 2000 with mks-tools
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: bernd dot herbold at gmx dot de
New email:
PHP Version: OS:

 

 [2001-12-28 16:39 UTC] bernd dot herbold at gmx dot de
Hi,

I tried to use PHP in connection with shellprogramming.

I would be fine if you could return exit codes to shellscripts. So that you can use something like "if [ $? -eq 0 ]" to test if the PHP-Script had run succesful.

So wouldn`t need to use Perl in future.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-12-29 15:27 UTC] derick@php.net
just use exit(number)
it returns the exit code (and also prints the value). The printing will be removed in PHP5 (if it is a number).

Derick
 [2001-12-29 16:22 UTC] bernd dot herbold at gmx dot de
Sorry,
I just tried your suggestion under Linux and it works.

But under Windows2000 with the mks-Toolkit and there it dosn't work.
Thnx
Bernd
 [2001-12-31 10:25 UTC] bernd dot herbold at gmx dot de
My mistake.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Oct 05 04:01:29 2024 UTC