note 86061 added to features.commandline

From: Date: Wed, 01 Oct 2008 15:40:59 +0000
Subject: note 86061 added to features.commandline
Groups: php.notes 
Request: Send a blank email to php-notes+get-144937@lists.php.net to get a copy of this message
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

« previous php.notes (#144937) next »