note 126803 added to function.getopt

From: Date: Wed, 26 Jan 2022 13:51:14 +0000
Subject: note 126803 added to function.getopt
Groups: php.notes 
Request: Send a blank email to php-notes+get-217547@lists.php.net to get a copy of this message
This documentation never really explains the logic behind $short_options and just expects that you get it from reading the examples. So if you are like me and start to think that the order of letters between the ":" characters has anything to say, think simpler. It really is... - every letter in the string will be allowed as a parameter, - if that letter has ONE colon after it, then it will require a value - if it has TWO colons, then it can accept a value - the order of the letters does not matter at all as long as the colons are where they belong. That means that these two examples are the same: "ab::c:def:" <-> "adec:f:b::" ---- Server IP: 45.112.84.4 Probable Submitter: 80.90.5.135 (proxied: 88.198.198.89) ---- Manual Page -- https://php.net/manual/en/function.getopt.php Edit -- https://main.php.net/note/edit/126803 Del: integrated -- https://main.php.net/note/delete/126803/integrated Del: useless -- https://main.php.net/note/delete/126803/useless Del: bad code -- https://main.php.net/note/delete/126803/bad+code Del: spam -- https://main.php.net/note/delete/126803/spam Del: non-english -- https://main.php.net/note/delete/126803/non-english Del: in docs -- https://main.php.net/note/delete/126803/in+docs Del: other reasons-- https://main.php.net/note/delete/126803 Reject -- https://main.php.net/note/reject/126803 Search -- https://main.php.net/manage/user-notes.php

« previous php.notes (#217547) next »