1
0
mirror of https://github.com/php/php-src.git synced 2026-04-22 07:28:09 +02:00
Files
archived-php-src/ext/sysvshm/tests/007.phpt
T
Fabien Villepinte 0c6d06ecfa Replace EXPECTF when possible
Closes GH-5779
2020-06-29 21:31:44 +02:00

29 lines
455 B
PHP

--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);
try {
shm_remove($s);
} catch (Error $exception) {
echo $exception->getMessage() . "\n";
}
echo "Done\n";
?>
--EXPECT--
bool(true)
Shared memory block has already been destroyed
Done