From daf137f5920b1f552eb256fc5abf51ae03028f8c Mon Sep 17 00:00:00 2001 From: Daniel Egeberg Date: Sat, 22 May 2010 09:33:18 +0000 Subject: [PATCH] Cleaned up the examples a bit git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@299622 c90b9560-bf6c-de11-be94-00142212c4b1 --- features/commandline.xml | 59 ++++++++++++++++++---------------------- 1 file changed, 27 insertions(+), 32 deletions(-) diff --git a/features/commandline.xml b/features/commandline.xml index 88a95d55ff..575ec5de23 100644 --- a/features/commandline.xml +++ b/features/commandline.xml @@ -240,11 +240,11 @@ The &cli.sapi; does not change the current directory to the directory of the executed script! - - + + Example showing the difference to the <acronym>CGI</acronym> <acronym>SAPI</acronym>: - </para> + This allows greater flexibility when writing shell tools in PHP. - + The CGI SAPI supports this @@ -457,10 +457,7 @@ $ php -c /custom/directory/custom-file.ini my_script.php ]]> - - - Examples (lines are wrapped for layout reasons): - + - + @@ -564,11 +561,8 @@ string(15) "doesntmakesense" -m --modules - - - Using this option, PHP prints out the built in (and loaded) PHP and - Zend modules: - + + Printing built in (and loaded) PHP and Zend modules - + @@ -607,10 +601,8 @@ ctype to not collide with command line variable substitution done by the shell. - - - Example showing a parser error - + + Getting a syntax error when using double quotes - + The problem here is that the sh/bash performs variable substitution even when using double quotes ". Since the @@ -633,11 +625,16 @@ Parse error: syntax error, unexpected '=' in Command line code on line 1 $ php -r " = get_defined_constants();" ]]> - - The correct way would be to use single quotes '. - Variables in single-quoted strings are not expanded - by sh/bash. - + + + + The correct way would be to use single quotes '. + Variables in single-quoted strings are not expanded + by sh/bash. + + + Using single quotes to prevent the shell's variable + substitution - + If you are using a shell different from sh/bash, you might experience further issues. Feel free to open a bug report at @@ -762,11 +759,9 @@ Total Lines: 37328 -v --version - - - Writes the PHP, PHP SAPI, and Zend version to - standard output, e.g. - + + Using <option>-v</option> to get the <acronym>SAPI</acronym> + name and the version of PHP and Zend - +