| @@ 3-44 (lines=42) @@ | ||
| 1 | <?php |
|
| 2 | ||
| 3 | class SimpleClass { |
|
| 4 | ||
| 5 | const CONSTANT_VARIABLE = "test"; |
|
| 6 | ||
| 7 | public static $publicStaticProperty = "test"; |
|
| 8 | protected static $protectedStaticProperty = "test"; |
|
| 9 | private static $_privateStaticProperty = "test"; |
|
| 10 | ||
| 11 | ||
| 12 | private $_privateProperty; |
|
| 13 | protected $_protectedProperty; |
|
| 14 | public $publicProperty; |
|
| 15 | ||
| 16 | private function _privateMethod() { |
|
| 17 | $localVar = "test"; |
|
| 18 | $this->_privateProperty = $localVar; |
|
| 19 | $this->_protectedProperty = $localVar; |
|
| 20 | $this->publicProperty = $localVar; |
|
| 21 | self::$publicStaticProperty = "test"; |
|
| 22 | self::$protectedStaticProperty = "test"; |
|
| 23 | self::$_privateStaticProperty = "test"; |
|
| 24 | } |
|
| 25 | ||
| 26 | protected function _protectedMethod() { |
|
| 27 | $localVar = "test"; |
|
| 28 | $this->_privateProperty = $localVar; |
|
| 29 | $this->_protectedProperty = $localVar; |
|
| 30 | $this->publicProperty = $localVar; |
|
| 31 | } |
|
| 32 | ||
| 33 | public function publicMethod() { |
|
| 34 | $localVar = "test"; |
|
| 35 | $this->_privateProperty = $localVar; |
|
| 36 | $this->_protectedProperty = $localVar; |
|
| 37 | $this->publicProperty = $localVar; |
|
| 38 | $this->_protectedMethod(); |
|
| 39 | $this->_privateMethod(); |
|
| 40 | $dt = new \DateTime(); |
|
| 41 | $dtMethodName = "getTimestamp"; |
|
| 42 | $dt->$dtMethodName(); |
|
| 43 | } |
|
| 44 | } |
|
| 45 | ||
| 46 | $simpleObject = new SimpleClass(); |
|
| 47 | $simpleObject->publicMethod(); |
|
| @@ 2-2 (lines=1) @@ | ||
| 1 | <?php |
|
| 2 | class SimpleClass { const CONSTANT_VARIABLE = "test"; public static $publicStaticProperty = "test"; protected static $protectedStaticProperty = "test"; private static $sp39db2b = "test"; private $sp8839d9; protected $_protectedProperty; public $publicProperty; private function sp51fa3f() { $spd8dce8 = "test"; $this->sp8839d9 = $spd8dce8; $this->_protectedProperty = $spd8dce8; $this->publicProperty = $spd8dce8; self::$publicStaticProperty = "test"; self::$protectedStaticProperty = "test"; self::$sp39db2b = "test"; } protected function _protectedMethod() { $spd8dce8 = "test"; $this->sp8839d9 = $spd8dce8; $this->_protectedProperty = $spd8dce8; $this->publicProperty = $spd8dce8; } public function publicMethod() { $spd8dce8 = "test"; $this->sp8839d9 = $spd8dce8; $this->_protectedProperty = $spd8dce8; $this->publicProperty = $spd8dce8; $this->_protectedMethod(); $this->sp51fa3f(); $spce0ae5 = new \DateTime(); $sp167220 = "getTimestamp"; $spce0ae5->{$sp167220}(); } } $sp5de0e2 = new SimpleClass(); $sp5de0e2->publicMethod(); |
|