i making amendments website built used quite literally 1000's of files called @ point (i assume attempt @ implementing dry), , searching specific function. usually, download entire project (via ftp), import favorite ide (netbeans) , perform search, limited because way access files individually through antiquated hosting control panel has no search functionality or mass download capability.
so, try make job easier, there way perform lookup details on function @ runtime, such file, , line on?
the server site running on has xdebug installed (i know, weird production server, i'm not complaining if can help).
you can use reflectionfunction class. php reflection classes can meta information php functions , classes. problem, do:
$function = new reflectionfunction('function_name'); // $function->getfilename() returns filename defined. // $function->getstartline() returns in line defined.
and on. in link above list of methods available.
Comments
Post a Comment