Skip to content

get with a watcher could not invoke the watcher callback #34

Open
@haiwenzhu

Description

@haiwenzhu
class ZookeeperDemo extends Zookeeper {

    public function watcher( $i, $type, $key ) { 
        echo "Insider Watcher\n";

        // Watcher gets consumed so we need to set a new one
        $this->get( '/bar', array($this, 'watcher' ) );
    }   

}

$zoo = new ZookeeperDemo('127.0.0.1:2181');
$zoo->set('/bar', 1); 
$zoo->get( '/bar', array($zoo, 'watcher') );

while( true ) { 
    echo '.';
    sleep(2);
}

running this in php-5.5.6 will report a php warning:
PHP Warning: Unknown: could not invoke watcher callback in Unknown on line 0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions