Bug #54410 [Bgs]: Path-related magic constants empty when CLI invoked with -H switch

From: Date: Mon, 06 Jun 2011 08:14:16 +0000
Subject: Bug #54410 [Bgs]: Path-related magic constants empty when CLI invoked with -H switch
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-161208@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=54410&edit=1 ID: 54410 User updated by: vedad at kajtaz dot net Reported by: vedad at kajtaz dot net Summary: Path-related magic constants empty when CLI invoked with -H switch Status: Bogus Type: Bug Package: CGI related Operating System: FreeBSD 7.1 PHP Version: 5.3.6 Block user comment: N Private report: N New Comment: Hi, The -H flag does exist, and is documented. http://php.net/manual/en/features.commandline.options.php -H Hide any passed arguments from external tools. Regards, Previous Comments: ------------------------------------------------------------------------ [2011-06-05 23:23:40] iliaa@php.net Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php there is no -H flag, Using an un-known flag triggers an error condition, which causes PHP to only show the available list of flags and not execute the script. ------------------------------------------------------------------------ [2011-03-28 17:28:05] vedad at kajtaz dot net Description: ------------ When invoking a script with CLI -H switch, __FILE__ and some other magic constants resolve to empty strings. Test script: --------------- # cat > /tmp/test.php <?php var_export(__FILE__); ?> ^D # php /tmp/test.php '/tmp/test.php' # php -H /tmp/test.php '' ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=54410&edit=1

« previous php.bugs (#161208) next »