note 32468 deleted from function.getopt by nicos
| From: | nicos@php.net | Date: | Thu, 29 May 2003 20:56:35 +0000 |
| Subject: | note 32468 deleted from function.getopt by nicos | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-49308@lists.php.net to get a copy of this message | ||
Note Submitter: csnyder of chxo/com
----
Note that the value assigned to options with no value is always FALSE.
So to test for the presence of an option on the command line, you actually need to do something like
this:
#!/usr/local/bin/php
<?
$options = getopt("abcde");
if ($options['e']===FALSE) print "\nI took e";
?>