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
 [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

Pull Requests

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: Sat Dec 21 12:01:31 2024 UTC