php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #30170 method to return function name
Submitted: 2004-09-20 18:52 UTC Modified: 2004-09-20 20:15 UTC
From: anagai at verizon dot net Assigned:
Status: Not a bug Package: Feature/Change Request
PHP Version: * OS: *
Private report: No CVE-ID: None
 [2004-09-20 18:52 UTC] anagai at verizon dot net
Description:
------------
This is a feature request. It would be nice if there was a method that returned the current function name. This would be good for error logging. I currently have to manually enter the function name in each function that has error handling. sometime i copy functions and they will have the wrong function name for error handling. a method that returned the current function name would be nice.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-09-20 19:36 UTC] alan_k@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

try __FUNCTION__
 [2004-09-20 20:16 UTC] helly@php.net
In PHP 5 you can also use __METHOD__. 

RTFM : Read The Fantastic Manual
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Nov 04 23:01:29 2024 UTC