getopt(PHP 4 >= 4.3.0, PHP 5) getopt — Gets options from the command line argument list Описание
array getopt
( string $options
[, array $longopts
] )
Parses options passed to the script. Список параметров
The options parameter may contain the following elements:
Возвращаемые значенияThis function will return an array of option / argument pairs or FALSE on failure. Список изменений
Примеры
Пример #1 getopt() Example
<?phpRunning the above script with php script.php -fvalue -h will output:
Пример #2 getopt() Example#2
<?phpRunning the above script with php script.php -f "value for f" -v -a --required value --optional="optional value" --option will output:
Пример #3 getopt() Example#3 Passing multiple options as one
<?phpRunning the above script with php script.php -aaac will output:
Примечания
|
|
|
| © 2009 Тест скорости интернета | Boont.Ru |