|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-07-30 08:47 UTC] php-bugs at thequod dot de
-Summary: "-d" parsed inconsistenly when invoked via shebang
+Summary: "-d" not parsed when invoked via shebang
[2010-07-30 08:47 UTC] php-bugs at thequod dot de
[2010-07-30 09:45 UTC] php-bugs at thequod dot de
[2010-07-30 09:48 UTC] degeberg@php.net
-Status: Open
+Status: Bogus
[2010-07-30 09:48 UTC] degeberg@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 13:00:02 2025 UTC |
Description: ------------ The behavior of PHP when used via shebang line in a script is different from using it directly: # cat > ~/test.php #!/usr/bin/php -n -ddate.timezone=Europe/Lisbon <?php exit(42); # chmod +x ~/test.php # ~/test.php ; echo $? Usage: php [options] [-f] <file> [--] [args...] [...] -d foo[=bar] Define INI entry foo with value 'bar' [...] 0 However, when used directly from the command line, the space after "-d" appears to be optional: # php -n -ddate.timezone=Europe/Lisbon -r 'echo date("H:i");' 07:15 # php -n -d date.timezone=Europe/Lisbon -r 'echo date("H:i");' 07:15 Please make the invocation via shebang behave the same in this regard (accept "-dfoo=bar")