Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@shin1x1
Created June 11, 2010 10:22
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 shin1x1/434330 to your computer and use it in GitHub Desktop.
Save shin1x1/434330 to your computer and use it in GitHub Desktop.
<?php
class A {
public $v = 1;
public function func() {
call_user_func(array($this, 'some'));
}
public function some() {
echo $this->v;
}
}
$obj = new A;
$obj->v = 2;
$obj->func();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment