note 86061 added to features.commandline

[email protected]
Newsgroups php.notes
Message-ID <[email protected]>
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.
----
Server IP: 209.41.74.194
Probable Submitter: 70.121.180.102
----
Manual Page -- http://www.php.net/manual/en/features.commandline.php
Edit        -- https://master.php.net/note/edit/86061
Del: integrated  -- https://master.php.net/note/delete/86061/integrated
Del: useless     -- https://master.php.net/note/delete/86061/useless
Del: bad code    -- https://master.php.net/note/delete/86061/bad+code
Del: spam        -- https://master.php.net/note/delete/86061/spam
Del: non-english -- https://master.php.net/note/delete/86061/non-english
Del: in docs     -- https://master.php.net/note/delete/86061/in+docs
Del: other reasons-- https://master.php.net/note/delete/86061
Reject      -- https://master.php.net/note/reject/86061
Search      -- https://master.php.net/manage/user-notes.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.