#28928 [Opn->WFx]: Function_Find_Def() request
| From: | magnus@php.net | Date: | Tue, 01 Jan 2008 16:06:50 +0000 |
| Subject: | #28928 [Opn->WFx]: Function_Find_Def() request | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-120976@lists.php.net to get a copy of this message | ||
ID: 28928
Updated by: magnus@php.net
Reported By: mark at seventhcycle dot net
-Status: Open
+Status: Wont fix
Bug Type: Feature/Change Request
Operating System: n/a
-PHP Version: Irrelevant
+PHP Version: 5
New Comment:
You can already do this with the reflection api, see
http://www.php.net/reflection
Previous Comments:
------------------------------------------------------------------------
[2004-06-25 19:38:22] mark at seventhcycle dot net
Description:
------------
For large projects that are coded without any sort of directed
structure, it's often very difficult to know where a user defined
function is defined / located.
What would be great to add to PHP would be a function that finds the
filename / line # that the function is defined:
See below for how it would work. I think this'd be a big help to a lot
of developers. Thanks in advance, guys!
Reproduce code:
---------------
<?php
// This Filename = "sample.php"
function GenericFunction()
{
return $x;
}
$arr = Function_Find_Def("GenericFunction");
echo "<BR>" . $arr["FileName"];
echo "<BR>" . $arr["LineNumber"];
Expected result:
----------------
sample.php
Line 5
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=28928&edit=1