php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #91 Parsing switches when executed from the command line
Submitted: 1998-02-20 06:54 UTC Modified: 1999-03-20 18:47 UTC
From: chrism at FOUR dot net Assigned:
Status: Closed Package: Feature/Change Request
PHP Version: 3.0b4 OS: FreeBSD/Windows
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
31 - 25 = ?
Subscribe to this entry?

 
 [1998-02-20 06:54 UTC] chrism at FOUR dot net
When using PHP to run scripts from the command line, i've
been unable to successfully parse 'switches' in the
arg vars.

Eg.  a small script (test.php3) which would like to accept
switches (-r, -h etc)
php script has #!/usr/local/bin/php -q at the top to allow
for kernel execution

# test.php -h

Unable to read the '-h' within the argument list, non
switch args passed fine.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-03-20 18:47 UTC] sas
the $argv array is supported
 [2021-09-04 10:33 UTC] git@php.net
Automatic comment on behalf of sy-records (author) and cmb69 (committer)
Revision: https://github.com/php/doc-en/commit/08a941584f00b659f595dfc6d108a73b2e6849a6
Log: Fix #91: curl_version() no longer accepts a parameter
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 10:01:31 2024 UTC