<?php include __DIR__."/../src/sysVcom.php"; //clear the queues at startup - otherwise things can get tricky clear_IPC( ); $msgArr = null; while(true){ $caller_id = 0; $obj = rpc_listen( $caller_id, $msgArr ); //print_r( $obj ); //do something with the data array_unshift( $obj, "Greetings" ); //send msg back rpc_reply( $caller_id, $obj ); //done with the message unset( $msgArr[$caller_id] ); } ?>