diff --git a/features/commandline.xml b/features/commandline.xml index 6fb1d9d686..285c9c933f 100644 --- a/features/commandline.xml +++ b/features/commandline.xml @@ -3,23 +3,20 @@ Using PHP from the command line - As of version 4.3.0, PHP supports a new - SAPI type (Server Application Programming Interface) - named CLI which means Command Line - Interface. As the name implies, this SAPI type - main focus is on developing shell (or desktop as well) applications with - PHP. There are quite a few differences between the - CLI SAPI and other SAPIs which are - explained in this chapter. It's worth mentioning - that CLI and CGI are different - SAPI's although they do share many of the same behaviors. + PHP supports a CLI SAPI as of PHP 4.3.0. + The main focus of this SAPI is for developing shell + applications with PHP. There are quite a few differences between the + CLI SAPI and other + SAPIs which are explained in this chapter. It is worth + mentioning that CLI and CGI are different + SAPI's although they do share many of the same behaviors. - The CLI SAPI was released for the first time with + The CLI SAPI was released for the first time with PHP 4.2.0, but was still experimental and had to be explicitly enabled with when running ./configure. Since PHP 4.3.0 the - CLI SAPI is no longer experimental and the option + CLI SAPI is no longer experimental and the option is on by default. You may use to disable it. @@ -83,8 +80,8 @@ - Remarkable differences of the CLI SAPI compared to other - SAPIs: + Remarkable differences of the CLI SAPI compared to other + SAPIs: @@ -122,7 +119,7 @@ Directive - CLI SAPI default value + CLI SAPI default value Comment @@ -166,14 +163,14 @@ Because this setting is &true; you will always have access to argc (number of arguments passed to the application) and argv (array of the actual - arguments) in the CLI SAPI. + arguments) in the CLI SAPI. As of PHP 4.3.0, the PHP variables $argc and $argv are registered and filled in with the appropriate - values when using the CLI SAPI. Prior to this version, + values when using the CLI SAPI. Prior to this version, the creation of these variables behaved as they do in - CGI and MODULE versions + CGI and MODULE versions which requires the PHP directive register_globals to be on. Regardless of version or register_globals @@ -306,7 +303,7 @@ php -r 'fwrite(STDERR, "stderr\n");' - The CLI SAPI does CLI SAPI does not change the current directory to the directory of the executed script! @@ -323,7 +320,7 @@ echo getcwd(), "\n"; ]]> - When using the CGI version, the output is: + When using the CGI version, the output is: - Using the CLI SAPI yields: + Using the CLI SAPI yields: - The CGI SAPI supports this CLI SAPI + The CGI SAPI supports this CLI SAPI behaviour by means of the switch when run from the command line. @@ -411,7 +408,7 @@ Usage: php [options] [-f] [--] [args...] - The CLI SAPI has three different ways of getting the + The CLI SAPI has three different ways of getting the PHP code you want to execute: