xref: /PHP-7.3/ext/sysvmsg/tests/003.phpt (revision 611a56fa)
1--TEST--
2msg_queue_exists()
3--SKIPIF--
4<?php if (!extension_loaded("sysvmsg")) die("skip sysvmsg extension is not available")?>
5--FILE--
6<?php
7$id = ftok(__FILE__, 'r');
8
9msg_remove_queue(msg_get_queue($id, 0600));
10
11var_dump(msg_queue_exists($id));
12$res = msg_get_queue($id, 0600);
13var_dump($res);
14var_dump(msg_queue_exists($id));
15var_dump(msg_remove_queue($res));
16var_dump(msg_queue_exists($id));
17echo "Done\n";
18?>
19--EXPECTF--
20bool(false)
21resource(%d) of type (sysvmsg queue)
22bool(true)
23bool(true)
24bool(false)
25Done
26