1.php-v View version number
[Root@rs-2 lib]# Php-v
PHP 5.5.11 (CLI) (BUILT:APR 29 2014 12:35:52)
Copyright (c) 1997-2014 the PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
2.php-h View Help
3.php-m to view installed modules
[Root@rs-2 lib]# Php-m
[PHP Modules]
Core
Type
4.php-i View php information (see php.ini very convenient)
[Root@rs-2 lib]# php-i grep php.ini
Configuration File (php.ini) Path =>/usr/local/lib
Loaded Configuration File =>/usr/local/lib/php.ini
5.php--ini Display configuration file name
[Root@rs-2 ~]# php--ini
Configuration File (php.ini) Path:/usr/local/lib
Loaded Configuration File:/usr/local/lib/php.ini
Scan for additional. ini files in: (none)
Additional. ini files parsed: (none)
6.php-f Execute PHP file
[Root@rs-2 phptest]# php-f helloworld.php
Helloword
For more tips, see php-h.
[Root@rs-2 ~]# Php-h
usage:php [Options] [f] [--] [args ...]
PHP [Options]-R [--] [args...]
PHP [Options] [-B ] [-E ] [--] [args...]
-R
PHP [Options] [ -b] -F [ -E] [--] [args ...]
PHP [Options] -S: [-t docroot]
PHP [Options]--[args ...]
PHP [Options]-A
-A Run interactively
-C Look for php.ini file in this directory
-N No php.ini file would be used
-D Foo[=bar] Define INI entry foo with value ' Bar '
-e Generate extended information for Debugger/profiler
-F Parse and execute .
-H This Help
-I PHP information
-L Syntax Check only (lint)
-m show compiled in modules
-R Run PHP without using script tags
-B Run PHP before processing input lines
-R Run PHP for every input line
-F Parse and execute for every input line
-e Run PHP after processing all input lines
-H Hide any passed arguments from external tools.
-S : Run with built-in Web server.
-T specify document root for built-in Web server.
-S Output HTML syntax highlighted source.
-V Version number
-W Output source with stripped comments and whitespace.
-Z Load Zend extension .
Args ... Arguments passed to script. Use--args when argument
Starts With-or script is read from stdin
--ini Show configuration file names
--RF show information about function .
--RC Show information about class .
--re show information about extension .
--rz show information about Zend extension .
--ri Show configuration for extension .