php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #44717 Magic constants: Don't work
Submitted: 2008-04-14 14:44 UTC Modified: 2008-04-14 14:59 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: pazpog at yahoo dot co dot uk Assigned:
Status: Not a bug Package: Directory function related
PHP Version: 5.2.5 OS: XP SP2
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: pazpog at yahoo dot co dot uk
New email:
PHP Version: OS:

 

 [2008-04-14 14:44 UTC] 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).

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-04-14 14:48 UTC] pazpog at yahoo dot co dot uk
Changed the Category (I chose the wrong one).
 [2008-04-14 14:59 UTC] scottmac@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

This is only available in PHP 5.3+
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Oct 06 07:01:27 2024 UTC