ipc - PHP: why msg_receive() receives wrong type? -


i test msg queue in php following code.

<?php  $mq = msg_get_queue(3141592653589793238);  while (true) {     $msg_type = null;     $msg = null;     $max_msg_size = 32;      msg_receive($mq, 1, $msg_type, $max_msg_size, $msg);     print "receive: $msg ($msg_type)\n"; }  ?> 

according manual, if desired type (here, = 1) positive, received type should same desired type. when run code, output below. in addition, non-blocking , keeps receiving empty message when nothing sent before.

receive:  (0) receive:  (0) receive:  (0) receive:  (0) receive:  (0) receive:  (0) receive:  (0) receive:  (0) receive:  (0) receive:  (0) receive:  (0) 

so wrong here?


Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -