xref: /PHP-8.0/ext/sysvmsg/tests/003.phpt (revision 0c6d06ec)
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--EXPECT--
20bool(false)
21object(SysvMessageQueue)#1 (0) {
22}
23bool(true)
24bool(true)
25bool(false)
26Done
27