note 86061 rejected from features.commandline by thiago

From: Date: Wed, 01 Oct 2008 15:43:39 +0000
Subject: note 86061 rejected from features.commandline by thiago
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-144938@lists.php.net to get a copy of this message
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.

« previous php.notes (#144938) next »