<?
class MyClass{
public function hello(){
MyClass::world($this);
}
public function ok(){
echo 'ok: ok';
}
static function world($object = null){
if($object != null && is_object($object) && method_exists($object,'ok')){
$object->ok();
echo'World';
}
}
}
$test = new MyClass;
$test->hello();
Комментариев нет:
Отправить комментарий