|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2018-05-11 16:27 UTC] cmb@php.net
-Status: Open
+Status: Verified
-Type: Bug
+Type: Documentation Problem
-Package: Unknown/Other Function
+Package: PHP options/info functions
[2018-05-11 16:27 UTC] cmb@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 07:00:01 2025 UTC |
Description: ------------ If you don't provide required arguments, getopt doesn't return FALSE; # php example.php array(0) { } Test script: --------------- <?php $shortopts = "f:"; // Required value $longopts = array( "required:", // Required value ); $options = getopt($shortopts, $longopts); var_dump($options); ?> Expected result: ---------------- bool(false) Actual result: -------------- array(0) { }