From: mark at seventhcycle dot net
Operating system: n/a
PHP version: Irrelevant
PHP Bug Type: Feature/Change Request
Bug description: Function_Find_Def() request
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 bug report at http://bugs.php.net/?id=28928&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=28928&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=28928&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=28928&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=28928&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=28928&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=28928&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=28928&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=28928&r=support
Expected behavior: http://bugs.php.net/fix.php?id=28928&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=28928&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=28928&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=28928&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28928&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=28928&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=28928&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=28928&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=28928&r=float