From f648a1f20f9252440a1ba44efc37cfe144189882 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Mon, 15 Dec 2003 17:39:25 +0000 Subject: [PATCH] Long options added git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@146510 c90b9560-bf6c-de11-be94-00142212c4b1 --- features/commandline.xml | 77 +++++++++++++++++++++++++++++++++------- 1 file changed, 64 insertions(+), 13 deletions(-) diff --git a/features/commandline.xml b/features/commandline.xml index a7cfc5b457..a33ade6fe6 100644 --- a/features/commandline.xml +++ b/features/commandline.xml @@ -1,5 +1,5 @@ - + Using PHP from the command line @@ -96,11 +96,11 @@ CLI is started up in quiet mode by default, though the -q - switch is kept for compatibility so that you can use older CGI scripts. + and --no-header switches are kept for compatibility so that you can use older CGI scripts. It does not change the working directory to that of the script. - (-C switch kept for compatibility) + (-C and --no-chdir switches kept for compatibility) Plain text error messages (no HTML formatting). @@ -108,12 +108,12 @@ - There are certain &php.ini; directives which are overriden by the CLI + There are certain &php.ini; directives which are overridden by the CLI SAPI because they do not make sense in shell environments: - Overriden &php.ini; directives + Overridden &php.ini; directives @@ -492,18 +492,21 @@ array(4) { which start with - to your script. + Long options are available since PHP 4.3.3.
Command line options Option + Long Option Description -s + --syntax-highlight Display colour syntax highlighted source. @@ -523,8 +526,18 @@ array(4) { + + -s + --syntax-highlighting + + + Alias of --syntax-highlight. + + + -w + --strip Display source with stripped comments and whitespace. @@ -539,6 +552,7 @@ array(4) { -f + --file Parses and executed the given filename to the -f @@ -549,6 +563,7 @@ array(4) { -v + --version Writes the PHP, PHP SAPI, and Zend version to standard output, e.g. @@ -564,6 +579,7 @@ Zend Engine v1.3.0, Copyright (c) 1998-2002 Zend Technologies -c + --php-ini With this option one can either specify a directory where to look for @@ -580,19 +596,17 @@ $ php -c /custom/directory/custom-file.ini my_script.php - -a + -n + --no-php-ini - Runs PHP interactively. - + Ignore php.ini at all. This switch is available since PHP 4.3.0. -d + --define This option allows you to set a custom value for any of the configuration @@ -630,8 +644,22 @@ string(15) "doesntmakesense" + + -a + --interactive + + + Runs PHP interactively. + + + + -e + --profile-info Generate extended information for debugger/profiler. @@ -644,6 +672,7 @@ string(15) "doesntmakesense" -z + --zend-extension Load Zend extension. If only a filename is given, PHP tries to load @@ -658,10 +687,11 @@ string(15) "doesntmakesense" -l + --syntax-check This option provides a convenient way to only perform a syntax check - on the given PHP code. On succes, the text + on the given PHP code. On success, the text No syntax errors detected in <filename> is written to standard output and the shell return code is 0. On failure, the text Errors parsing @@ -683,6 +713,7 @@ string(15) "doesntmakesense" -m + --modules Using this option, PHP prints out the built in (and loaded) PHP and @@ -710,6 +741,7 @@ ctype -i + --info This command line option calls phpinfo, and prints out the results. If PHP is not working correctly, it is @@ -721,6 +753,7 @@ ctype -r + --run This option allows execution of PHP right from @@ -791,11 +824,29 @@ array(370) { -h + --help With this option, you can get information about the actual list of command line options and some one line descriptions about what they do. + + -? + --usage + + Alias of --help. + + +
@@ -814,7 +865,7 @@ array(370) { Note, that you can always direct the output of the PHP executable to an external file with the > character, - so php -q test.php > test.html will + so php -q test.php > test.html will print out the output of test.php without HTTP headers to the test.html file in the same directory.