diff options
Diffstat (limited to 'sapi/cli')
| -rw-r--r-- | sapi/cli/php.1.in | 15 | ||||
| -rw-r--r-- | sapi/cli/php_cli.c | 10 | ||||
| -rw-r--r-- | sapi/cli/php_cli_readline.c | 8 | ||||
| -rw-r--r-- | sapi/cli/php_cli_readline.h | 4 | ||||
| -rw-r--r-- | sapi/cli/tests/006.phpt | 4 |
5 files changed, 24 insertions, 17 deletions
diff --git a/sapi/cli/php.1.in b/sapi/cli/php.1.in index 52161973d..c800e127f 100644 --- a/sapi/cli/php.1.in +++ b/sapi/cli/php.1.in @@ -1,4 +1,4 @@ -.TH PHP 1 "2009" "The PHP Group" "Scripting Language" +.TH PHP 1 "2010" "The PHP Group" "Scripting Language" .SH NAME .TP 15 php \- PHP Command Line Interface 'CLI' @@ -69,7 +69,7 @@ specified by \-F to be executed. You can access the input line by \fB$argn\fP. While processing the input lines .B $argi contains the number of the actual line being processed. Further more -the paramters \-B and \-E can be used to execute +the parameters \-B and \-E can be used to execute .IR code (see \-r) before and after all input lines have been processed respectively. Notice that the @@ -304,6 +304,9 @@ Shows information about extension .IR name Shows configuration for extension .B name +.TP +.B \-\-ini +Show configuration file names .SH FILES .TP 15 .B php\-cli.ini @@ -315,7 +318,7 @@ The standard configuration file will only be used when cannot be found. .SH EXAMPLES .TP 5 -\fIphp -r 'echo "Hello World\\n";'\fP +\fIphp \-r 'echo "Hello World\\n";'\fP This command simply writes the text "Hello World" to standard out. .TP \fIphp \-r 'print_r(gd_info());'\fP @@ -339,7 +342,7 @@ configuration information. If you then combine those two Using this PHP command you can count the lines being input. .TP \fIphp \-R '@$l+=count(file($argn));' \-E 'echo "Lines:$l\\n";'\fP -In this example PHP expects each input line beeing a file. It counts all lines +In this example PHP expects each input line being a file. It counts all lines of the files specified by each input line and shows the summarized result. You may combine this with tools like find and change the php scriptlet. .TP @@ -366,7 +369,7 @@ such a first line as shown below: .PD 1 .P .SH SEE ALSO -For a description of PHP see: +For a more or less complete description of PHP look here: .PD 0 .P .B http://www.php.net/manual/ @@ -395,7 +398,7 @@ contributors all around the world. .SH VERSION INFORMATION This manpage describes \fBphp\fP, version @PHP_VERSION@. .SH COPYRIGHT -Copyright \(co 1997\-2009 The PHP Group +Copyright \(co 1997\-2010 The PHP Group .LP This source file is subject to version 3.01 of the PHP license, that is bundled with this package in the file LICENSE, and is diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c index aeade0940..2b372906b 100644 --- a/sapi/cli/php_cli.c +++ b/sapi/cli/php_cli.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2009 The PHP Group | + | Copyright (c) 1997-2010 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_cli.c 287973 2009-09-02 20:02:17Z pajoye $ */ +/* $Id: php_cli.c 293036 2010-01-03 09:23:27Z sebastian $ */ #include "php.h" #include "php_globals.h" @@ -76,8 +76,10 @@ #endif #if (HAVE_LIBREADLINE || HAVE_LIBEDIT) && !defined(COMPILE_DL_READLINE) +#if HAVE_LIBEDIT +#include <editline/readline.h> +#else #include <readline/readline.h> -#if !HAVE_LIBEDIT #include <readline/history.h> #endif #include "php_cli_readline.h" @@ -829,7 +831,7 @@ int main(int argc, char *argv[]) } request_started = 1; - php_printf("PHP %s (%s) (built: %s %s) %s\nCopyright (c) 1997-2009 The PHP Group\n%s", + php_printf("PHP %s (%s) (built: %s %s) %s\nCopyright (c) 1997-2010 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, #if ZEND_DEBUG && defined(HAVE_GCOV) "(DEBUG GCOV)", diff --git a/sapi/cli/php_cli_readline.c b/sapi/cli/php_cli_readline.c index 66010d7b0..f76f94885 100644 --- a/sapi/cli/php_cli_readline.c +++ b/sapi/cli/php_cli_readline.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2009 The PHP Group | + | Copyright (c) 1997-2010 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_cli_readline.c 272370 2008-12-31 11:15:49Z sebastian $ */ +/* $Id: php_cli_readline.c 293036 2010-01-03 09:23:27Z sebastian $ */ #include "php.h" @@ -49,8 +49,10 @@ #include <unixlib/local.h> #endif +#if HAVE_LIBEDIT +#include <editline/readline.h> +#else #include <readline/readline.h> -#if !HAVE_LIBEDIT #include <readline/history.h> #endif diff --git a/sapi/cli/php_cli_readline.h b/sapi/cli/php_cli_readline.h index d2fd65935..ce68321bc 100644 --- a/sapi/cli/php_cli_readline.h +++ b/sapi/cli/php_cli_readline.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2009 The PHP Group | + | Copyright (c) 1997-2010 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_cli_readline.h 272370 2008-12-31 11:15:49Z sebastian $ */ +/* $Id: php_cli_readline.h 293036 2010-01-03 09:23:27Z sebastian $ */ #include "php.h" diff --git a/sapi/cli/tests/006.phpt b/sapi/cli/tests/006.phpt index e322d7ef7..530bfbd9f 100644 --- a/sapi/cli/tests/006.phpt +++ b/sapi/cli/tests/006.phpt @@ -79,7 +79,7 @@ string(%d) "Extension [ <persistent> extension #%d pcre version <no_version> ] { - Parameters [5] { Parameter #0 [ <required> $regex ] Parameter #1 [ <required> $replace ] - Parameter #2 [ <optional> $subject ] + Parameter #2 [ <required> $subject ] Parameter #3 [ <optional> $limit ] Parameter #4 [ <optional> &$count ] } @@ -99,7 +99,7 @@ string(%d) "Extension [ <persistent> extension #%d pcre version <no_version> ] { - Parameters [5] { Parameter #0 [ <required> $regex ] Parameter #1 [ <required> $replace ] - Parameter #2 [ <optional> $subject ] + Parameter #2 [ <required> $subject ] Parameter #3 [ <optional> $limit ] Parameter #4 [ <optional> &$count ] } |
