Created
April 4, 2020 12:59
-
-
Save caramelchocolate/2470033e51437cc7ea0995bb0b465f8a to your computer and use it in GitHub Desktop.
Test getopt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
# php -d register_argc_argv=0 main.php | |
var_dump(ini_get("register_argc_argv")); | |
$argv = [ | |
__FILE__, | |
'-f', | |
'123', | |
]; | |
var_dump(getopt('f:')); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment