Example #1
0
<?php

class A
{
    const C = 123;
    static function t($a = B::C)
    {
    }
}
A::t();
class B
{
    const C = 456;
    static function t($a = A::C)
    {
    }
}
B::t();
Example #2
0
 protected function getTranslationByValue($value)
 {
     return A::t($this->_translationCategory, $this->getLabelByValue($value));
 }
Example #3
0
<?php

$a = 1;
class A
{
    public function t()
    {
        global $a;
        $b = 'a';
        var_dump(${$b});
    }
}
$obj = new A();
$obj->t();
Example #4
0
<?php

trait T
{
    private $a = 1;
    private static $sa = 1;
    public $pa = 1;
    public static $spa = 1;
    public function t()
    {
        var_dump($this->a);
        var_dump(get_object_vars($this));
    }
}
class A
{
    use T;
    private $b = 4;
    public $c = 'hi';
    private static $sb = 4;
    public static $sc = 'hi';
}
$a = new A();
$a->t();