• Version 3.5 and earlier: optstrictparameters variable not available.
  • Version 4.0 and later: optstrictparameters variable available.


The getopt_long() function provides strict interpretation of argument parameters. In particular, arguments with optional parameters are accepted only in the form --argument=parameter. Some non-compliant programs allow --argument parameter. To make getopt_long() recognize the latter form, set optstrictparameters to false.

optstrictparameters = boolean;
true Allows getopt_long()'s strict interpretation of argument parameters. The default is true.
false Makes getopt_long() recognize --argument parameter specifications.
optstrictparameters = false;

For more information, please see the following: