ID: 36319 Updated by: [EMAIL PROTECTED] Reported By: lapo at lapo dot it -Status: Open +Status: Closed Bug Type: Documentation problem Operating System: anything but FreeBSD PHP Version: Irrelevant New Comment:
This bug has been fixed in the documentation's XML sources. Since the online and downloadable versions of the documentation need some time to get updated, we would like to ask you to be a bit patient. Thank you for the report, and for helping us make our documentation better. Previous Comments: ------------------------------------------------------------------------ [2006-02-07 16:02:05] lapo at lapo dot it Description: ------------ http://it.php.net/manual/en/function.getopt.php This page states that as of 4.3.0 PHP has got a second parameter called longopts that should enable getopt_long functionality. The first problem is that it doesn't have any specific example, and the format of such parameter is not explained at all. The second, and biggest, problem is that the functionality never made it in any PHP release except 4.3.0pre2 as it was created in version: http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/basic_functions.c?view=log#rev1.533 and removed 9 days later, in version http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/basic_functions.c?view=log#rev1.540 by the very author. Reproduce code: --------------- % cat test.php #!/usr/local/bin/php <? $o = getopt('f:hp:', array('file:')); print_r($o); ?> Expected result: ---------------- % ./test.php --file=a Array ( [file] => a ) Actual result: -------------- % ./test.php --file=a Array ( [f] => ile=a ) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=36319&edit=1
