#36091 [NEW]: getopt() returns false on every call
From: oli at isnic dot is
Operating system: FreeBSD 5.4
PHP version: 4.4.2
PHP Bug Type: Unknown/Other Function
Bug description: getopt() returns false on every call
Description:
------------
The "fix" in bug #35594 breaks getopt() in PHP4 completely
on my system, it returns false on every call now.
FreeBSD 5.4-RELEASE-p8 and php-4.4.2 updated today.
Removing the "fix" makes getopt() work again.
Reproduce code:
---------------
$options = getopt("b:s");
if (!$options) {
print("\$options is false\n");
}
else {
foreach ($options as $key => $value) {
if ($value) {
print($key."=".$value."\n");
}
else {
print($key."=false\n");
}
}
}
exit(0);
Expected result:
----------------
#./getopt.php -s -b 1
s=false
b=1
Actual result:
--------------
#./getopt.php -s -b 1
$options is false
--
Edit bug report at http://bugs.php.net/?id=36091&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=36091&r=trysnapshot44
Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=36091&r=trysnapshot51
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=36091&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=36091&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=36091&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=36091&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=36091&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=36091&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=36091&r=support
Expected behavior: http://bugs.php.net/fix.php?id=36091&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=36091&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=36091&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=36091&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=36091&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=36091&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=36091&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=36091&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=36091&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=36091&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=36091&r=mysqlcfg
Thread (19 messages)
- oli at isnic dot is
- sniper@php.net#36091 [Opn->Fbk]: getopt() returns false on every call
- oli at isnic dot is#36091 [Fbk->Opn]: getopt() returns false on every call
- sniper@php.net#36091 [Opn->Asn]: getopt() returns false on every call
- tony2001@php.net#36091 [Asn]: getopt() returns false on every call
- tony2001@php.net#36091 [Asn]: getopt() returns false on every call
- ale at FreeBSD dot org#36091 [Com]: getopt() returns false on every call
- derick@php.net#36091 [Asn]: getopt() returns false on every call
- ale at FreeBSD dot org#36091 [Com]: getopt() returns false on every call
- tony2001@php.net#36091 [Asn]: getopt() returns false on every call
- oli at isnic dot is#36091 [Asn]: getopt() returns false on every call
- tony2001@php.net#36091 [Asn]: getopt() returns false on every call
- oli at isnic dot is#36091 [Asn]: getopt() returns false on every call
- ale at FreeBSD dot org#36091 [Com]: getopt() returns false on every call
- tony2001@php.net#36091 [Asn->Opn]: getopt() returns false on every call
- ale at FreeBSD dot org#36091 [Com]: getopt() returns false on every call
- sniper@php.net#36091 [Opn->Asn]: getopt() returns false on every call
- tony2001@php.net#36091 [Asn->Opn]: getopt() returns false on every call
- bfrance@php.net#36091 [Opn->Csd]: getopt() returns false on every call