<?php

$ctx = new ZMQContext();
$socket = $ctx->getSocket(ZMQ::SOCKET_PULL);
$socket->connect('tcp://127.0.0.1:6001');

for ($i = 0; $i < 100; $i++) {
    $data = $socket->recv();
    list($a, $b) = explode('+', $data);
    $c = $a + $b;
    echo "$a + $b = $c\n";
}
