Created
October 3, 2012 08:03
-
-
Save ariscop/3825731 to your computer and use it in GitHub Desktop.
Php fun
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class a { | |
protected $foo = "foo"; | |
function foo() { | |
print($this->foo); | |
} | |
function a() { | |
$this->foo = "bar"; | |
$this->foo(); | |
} | |
}; | |
new a(); | |
//output: bar |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment