$redis->subscribe(array('channel-1'), function ($redis, $chan, $msg) { // do something echo $msg;});然后在其它的程序里向channel-1发送你需要发送的消息$redis->publish('channel-1', 'hello, world!');