summaryrefslogtreecommitdiff
path: root/ext/sysvshm/tests/007.phpt
blob: 747d401333acdab81e850ba6f1e8afcd3f0f7ec3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
--TEST--
shm_remove() tests
--SKIPIF--
<?php
if (!extension_loaded("sysvshm")){ print 'skip'; }
if (!function_exists('ftok')){ print 'skip'; }
?>
--FILE--
<?php

$key = ftok(__FILE__, 't');
$s = shm_attach($key, 1024);

var_dump(shm_remove($s));

shm_detach($s);
var_dump(shm_remove($s));

echo "Done\n";
?>
--EXPECTF--
bool(true)

Warning: shm_remove(): supplied resource is not a valid sysvshm resource in %s007.php on line %d
bool(false)
Done