#44717 [Opn]: Magic constants: Don't work
| From: | pazpog at yahoo dot co dot uk | Date: | Mon, 14 Apr 2008 14:48:07 +0000 |
| Subject: | #44717 [Opn]: Magic constants: Don't work | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-124213@lists.php.net to get a copy of this message | ||
ID: 44717
User updated by: pazpog at yahoo dot co dot uk
Reported By: pazpog at yahoo dot co dot uk
Status: Open
-Bug Type: CGI related
+Bug Type: Directory function related
Operating System: XP SP2
PHP Version: 5.2.5
New Comment:
Changed the Category (I chose the wrong one).
Previous Comments:
------------------------------------------------------------------------
[2008-04-14 14:44:32] pazpog at yahoo dot co dot uk
Description:
------------
Magic constants do not work in CLI. It simply returns the name of the
constant - For example, if the constant is called __DIR__, it would just
return __DIR__ instead of the directory the script is in.
Reproduce code:
---------------
<?php
echo(__DIR__);
?>
Expected result:
----------------
I expected it to echo the directory the script is in. Eg; E:\phpHuman.
Actual result:
--------------
It echos __DIR__ (the name of the constant).
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=44717&edit=1