PHP 8.5.0 Released!

Voting

: zero minus zero?
(Example: nine)

The Note You're Voting On

frank at frank dot com
17 years ago
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();
?>

<< Back to user notes page

AltStyle によって変換されたページ (->オリジナル) /