Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- class test {
- protected static $var = 'hello';
- public function test2() {
- if(empty($this->var)) {
- echo 'this empty<BR>';
- }
- else {
- echo 'this populated<BR>';
- }
- if(empty(self::$var)) {
- echo 'self empty<BR>';
- }
- else {
- echo 'self populated<BR>';
- }
- }
- public static function test1() {
- echo "this not avail.<bR>";
- if(empty(self::$var)) {
- echo 'self empty<BR>';
- }
- else {
- echo 'self populated<BR>';
- }
- }
- }
- test::test1();
- $temp = new test();
- $temp->test2();
Add Comment
Please, Sign In to add comment