PHP function getopt()

Availability in versions: PHP 4.3.0

Gets options from the command line argument list

Parameters

Parameter Data type Default value Note
$options string not
$longopts array null,
$optind int null

Return values

array

This function will return an array of option / argument pairs or false on failure.

Additional resources

Official getopt documentation

Newsletter

Nejlepsi tipy a triky o PHP do Vaseho e-mailu. Clanky a novinky nejen ze sveta PHP a programovani.