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 this is not your bug, you can add a comment by following this link.
If this is your bug, but 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

Add a Patch

Pull Requests

Add a Pull Request

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-2021 The PHP Group
All rights reserved.
Last updated: Sun Mar 07 03:01:23 2021 UTC