|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-01-01 16:06 UTC] magnus@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Dec 03 11:00:01 2025 UTC |
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