mirror of
https://github.com/php/php-src.git
synced 2026-04-22 15:38:49 +02:00
7485978339
This is an automated migration of most SKIPIF extension_loaded checks.
45 lines
663 B
PHP
45 lines
663 B
PHP
--TEST--
|
|
shm_detach() tests
|
|
--EXTENSIONS--
|
|
sysvshm
|
|
--SKIPIF--
|
|
<?php
|
|
|
|
if (!function_exists('ftok')){ print 'skip'; }
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
|
|
$key = ftok(__DIR__."/003.phpt", 'q');
|
|
|
|
$s = shm_attach($key);
|
|
|
|
var_dump(shm_detach($s));
|
|
try {
|
|
shm_detach($s);
|
|
} catch (Error $exception) {
|
|
echo $exception->getMessage() . "\n";
|
|
}
|
|
|
|
try {
|
|
shm_remove($s);
|
|
} catch (Error $exception) {
|
|
echo $exception->getMessage() . "\n";
|
|
}
|
|
|
|
echo "Done\n";
|
|
?>
|
|
--CLEAN--
|
|
<?php
|
|
|
|
$key = ftok(__DIR__."/003.phpt", 'q');
|
|
$s = shm_attach($key);
|
|
shm_remove($s);
|
|
|
|
?>
|
|
--EXPECT--
|
|
bool(true)
|
|
Shared memory block has already been destroyed
|
|
Shared memory block has already been destroyed
|
|
Done
|