Home » » getopt

getopt

Written By 1 on Tuesday, October 2, 2012 | 9:00 AM

array getopt ( string $options [, array $longopts ] )

Gets options from the command line argument list

Parses options passed to the script.


<?php
$options 
getopt("f:hp:");
var_dump($options);
?>

5.3.0 Added support for "=" as argument/value separator. 5.3.0 Added support for optional values (specified with "::"). 5.3.0 Parameter longopts is available on all systems. 5.3.0 This function is no longer system dependent, and now works on Windows, too.


0 Comment:

Post a Comment