ID: 28928 Updated by: [EMAIL PROTECTED] 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
