note 113278 added to function.debug-backtrace
| From: | jonas at faceways dot se | Date: | Fri, 20 Sep 2013 07:41:13 +0000 |
| Subject: | note 113278 added to function.debug-backtrace | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-196321@lists.php.net to get a copy of this message | ||
When using debug_backtrace() to check if you're being accessed from another caller, please
remember to ask debug_backtrace to only go as far as needed in depth and skip taking the entire
debug object as return parameter:
<?php
if (count(debug_backtrace(FALSE, 1)) == 0)
{
// Do something
}
?>
----
Server IP: 69.147.83.199
Probable Submitter: 212.247.236.130
----
Manual Page -- http://php.net/manual/en/function.debug-backtrace.php
Edit -- https://master.php.net/note/edit/113278
Del: integrated -- https://master.php.net/note/delete/113278/integrated
Del: useless -- https://master.php.net/note/delete/113278/useless
Del: bad code -- https://master.php.net/note/delete/113278/bad+code
Del: spam -- https://master.php.net/note/delete/113278/spam
Del: non-english -- https://master.php.net/note/delete/113278/non-english
Del: in docs -- https://master.php.net/note/delete/113278/in+docs
Del: other reasons-- https://master.php.net/note/delete/113278
Reject -- https://master.php.net/note/reject/113278
Search -- https://master.php.net/manage/user-notes.php