note 86061 rejected from features.commandline by thiago
| Newsgroups | php.notes |
|---|---|
| Message-ID | <[email protected]> |
Note Submitter: cchubb at codegurus dot com
----
The last example is ALMOST perfect. One bug I found was that the line:
$ret['options'][$com] = !empty($value) ? $value : true;
needs to be converted to
$ret['options'][$com] = (strlen($value) > 0 ? $value : true);
Otherwise an --option=0 turns into --option=1 when parsed. empty('0') == true.