007.phpt 428 B

123456789101112131415161718192021222324252627282930
  1. --TEST--
  2. shm_remove() tests
  3. --EXTENSIONS--
  4. sysvshm
  5. --SKIPIF--
  6. <?php
  7. if (!function_exists('ftok')){ print 'skip'; }
  8. ?>
  9. --FILE--
  10. <?php
  11. $key = ftok(__FILE__, 't');
  12. $s = shm_attach($key, 1024);
  13. var_dump(shm_remove($s));
  14. shm_detach($s);
  15. try {
  16. shm_remove($s);
  17. } catch (Error $exception) {
  18. echo $exception->getMessage() . "\n";
  19. }
  20. echo "Done\n";
  21. ?>
  22. --EXPECT--
  23. bool(true)
  24. Shared memory block has already been destroyed
  25. Done