1--TEST-- 2shm_remove() tests 3--SKIPIF-- 4<?php 5if (!extension_loaded("sysvshm")){ print 'skip'; } 6if (!function_exists('ftok')){ print 'skip'; } 7?> 8--FILE-- 9<?php 10 11$key = ftok(__FILE__, 't'); 12$s = shm_attach($key, 1024); 13 14var_dump(shm_remove()); 15var_dump(shm_remove(-1)); 16var_dump(shm_remove(0)); 17var_dump(shm_remove("")); 18 19var_dump(shm_remove($s)); 20 21shm_detach($s); 22var_dump(shm_remove($s)); 23 24echo "Done\n"; 25?> 26--EXPECTF-- 27Warning: shm_remove() expects exactly 1 parameter, 0 given in %s007.php on line %d 28NULL 29 30Warning: shm_remove() expects parameter 1 to be resource, integer given in %s007.php on line %d 31NULL 32 33Warning: shm_remove() expects parameter 1 to be resource, integer given in %s007.php on line %d 34NULL 35 36Warning: shm_remove() expects parameter 1 to be resource, string given in %s007.php on line %d 37NULL 38bool(true) 39 40Warning: shm_remove(): supplied resource is not a valid sysvshm resource in %s007.php on line %d 41bool(false) 42Done 43