public function receive()
    {
        if (($shmId = @shmop_open($this->pid, 'a', 0, 0)) > 0) {
            $serializedMessages = shmop_read($shmId, 0, shmop_size($shmId));
            shmop_delete($shmId);
            shmop_close($shmId);

            return unserialize($serializedMessages);
        }

        return array();
    }
public function receive()
    {
        if (($shmId = @shmop_open($this->pid, 'a', 0, 0)) > 0) {
            $serializedMessages = shmop_read($shmId, 0, shmop_size($shmId));
            shmop_delete($shmId);
            shmop_close($shmId);

            return unserialize($serializedMessages);
        }

        return array();
    }
public function receive ( ) { if ( ( $ shmId = @ shmop_open ( $ this -> pid , 'a' , 0 , 0 ) ) > 0 ) { $ serializedMessages = shmop_read ( $ shmId , 0 , shmop_size ( $ shmId ) ) ; shmop_delete ( $ shmId ) ; shmop_close ( $ shmId ) ; return unserialize ( $ serializedMessages ) ; } return array ( ) ; }
Reads all messages from shared memory.

@return array An array of messages
Reads all messages from shared memory .