note 83033 added to function.debug-backtrace
| From: | frank at frank dot com | Date: | Wed, 07 May 2008 18:12:27 +0000 |
| Subject: | note 83033 added to function.debug-backtrace | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-139135@lists.php.net to get a copy of this message | ||
Here is my simple example:
Code printing variable of class which instatiates the printing class.
Well, I am sure you understand when looking at the code:
Print result is: jippii
<?php
class A {
function something() {
$s = debug_backtrace();
$callingObject = $s[1]['object'];
$test = $callingObject->jip;
print $test;
}
}
class B {
var $jip;
function execute() {
$a = new A();
$this->jip = "jippii";
$a->something();
}
}
$control = new B();
$control->execute();
?>
----
Server IP: 87.124.64.96
Probable Submitter: 91.153.118.115
----
Manual Page -- http://www.php.net/manual/en/function.debug-backtrace.php
Edit -- https://master.php.net/note/edit/83033
Del: integrated -- https://master.php.net/note/delete/83033/integrated
Del: useless -- https://master.php.net/note/delete/83033/useless
Del: bad code -- https://master.php.net/note/delete/83033/bad+code
Del: spam -- https://master.php.net/note/delete/83033/spam
Del: non-english -- https://master.php.net/note/delete/83033/non-english
Del: in docs -- https://master.php.net/note/delete/83033/in+docs
Del: other reasons-- https://master.php.net/note/delete/83033
Reject -- https://master.php.net/note/reject/83033
Search -- https://master.php.net/manage/user-notes.php