note 101607 added to language.constants.predefined

From: Date: Wed, 29 Dec 2010 23:26:39 +0000
Subject: note 101607 added to language.constants.predefined
Groups: php.notes 
Request: Send a blank email to php-notes+get-175319@lists.php.net to get a copy of this message
There needs to be more of these magic constants. __INVOKING_FUNCTION__ -- what function called *this* function __INVOKING_FILE__ -- what file called this file. etc. For example, I have a database wrapper. Everything in my code calls it. I want to prefix the filename and function that called my sql_query() function. But If I use the __FILE__ and __FUNCTION__ I always get back "db.inc.php" and "sql_query()" every time. Not very useful. The only other current option is to use the "backtrace()" call and parse that out every time which is tedious and slow. ---- Server IP: 192.41.42.26 Probable Submitter: 206.169.197.253 ---- Manual Page -- http://www.php.net/manual/en/language.constants.predefined.php Edit -- https://master.php.net/note/edit/101607 Del: integrated -- https://master.php.net/note/delete/101607/integrated Del: useless -- https://master.php.net/note/delete/101607/useless Del: bad code -- https://master.php.net/note/delete/101607/bad+code Del: spam -- https://master.php.net/note/delete/101607/spam Del: non-english -- https://master.php.net/note/delete/101607/non-english Del: in docs -- https://master.php.net/note/delete/101607/in+docs Del: other reasons-- https://master.php.net/note/delete/101607 Reject -- https://master.php.net/note/reject/101607 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#175319) next »