public function __construct() { $this->publicProperty = 100; self::$publicStaticProperty = 1; Foo::$publicStaticProperty = 2; $this->protectedProperty = 200; self::$protectedStaticProperty = 1; Foo::$protectedStaticProperty = 2; $this->privateProperty = 300; self::$privateStaticProperty = 1; Foo::$privateStaticProperty = 2; $this->publicMethod(); $this->finalPublicMethod(); self::publicStaticMethod(); Foo::publicStaticMethod(); $this->protectedMethod(); $this->finalProtectedMethod(); self::protectedStaticMethod(); Foo::protectedStaticMethod(); $this->privateMethod(); $this->finalPrivateMethod(); self::privateStaticMethod(); Foo::privateStaticMethod(); echo self::ALWAYS_PUBLIC_CONST; echo Foo::ALWAYS_PUBLIC_CONST; }
public function __construct() { $this->publicProperty = 100; self::$publicStaticProperty = 1; sp42e11a::$publicStaticProperty = 2; $this->protectedProperty = 200; self::$protectedStaticProperty = 1; sp42e11a::$protectedStaticProperty = 2; $this->sp3318d5 = 300; self::$sp923e4b = 1; sp42e11a::$sp923e4b = 2; $this->publicMethod(); $this->finalPublicMethod(); self::publicStaticMethod(); sp42e11a::publicStaticMethod(); $this->protectedMethod(); $this->finalProtectedMethod(); self::protectedStaticMethod(); sp42e11a::protectedStaticMethod(); $this->sp1815d4(); $this->sp5b7894(); self::sp2754ba(); sp42e11a::sp2754ba(); echo self::ALWAYS_PUBLIC_CONST; echo sp42e11a::ALWAYS_PUBLIC_CONST; }
require_once 'tutorial_autoload.php'; class TestFoo { protected $someAttribute = 'I am an attribute'; public function makeTest() { $bar = new TestBar('some param', 23); $bar->informTest(array(true, 'foo' => 42.23), $this); } } class TestBar { public $publicAttribute; private $privateAttribute; public function __construct($param, $anotherParam) { $this->publicAttribute = $param; $this->protectedAttribute = $anotherParam; } public function informTest($arrayParam, $object) { // Issue log message with stacktrace ezcDebug::getInstance()->log('informTest() called.', ezcLog::NOTICE, array(), true); } } // Example object structure. $foo = new TestFoo(); // Genrates a stack trace internally. $foo->makeTest(); // Print HTML output. echo ezcDebug::getInstance()->generateOutput();