Skip to content

Instantly share code, notes, and snippets.

@dawehner
Created January 29, 2014 21:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dawehner/8697704 to your computer and use it in GitHub Desktop.
Save dawehner/8697704 to your computer and use it in GitHub Desktop.
class foo {
public $foo = 123;
public function test() {
test($this);
print $this->foo;
}
}
function test(foo $foo) {
$new_foo = new foo();
$new_foo->foo = 'hey';
$foo = $new_foo;
}
$foo = new foo();
$foo->test();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment