I'm having an issue with callback functions, specifically storing them...

If I have a class:

PHP Code:
class myObject{

    protected 
$callback;

    public function 
__construct($callbackFunction){
        
$this->callback $callbackFunction;
        .
        .
        .
    }

    public function 
doSomething($args){
        if(
is_callable($this->callback)){
            return 
$this->callback($args);
        }
    }


And I try doing this:

PHP Code:

function foo($arg){
    return 
strtoupper($arg);
}

$myNewObject = new myObject("foo");
echo 
$myNewObject->doSomething("bar"); //should echo BAR 
I end up with an error:

Code:
Fatal Error: Call to undefined method MyObject::callback() in ...
The is_callable() is succeeding, but the actual callback function call is the line failing with that error.

This isn't exactly what I'm doing obviously, but its a replicate of the code. Any ideas?