function remove($key) { return a::remove($_SESSION, $key); }
/** * Removes a value from the session by key * * @param mixed $key The key to remove by * @return array The session array without the value */ static function remove($key) { if (!isset($_SESSION)) { return false; } $_SESSION = a::remove($_SESSION, $key, true); return $_SESSION; }
function testArrayRemove() { $this->assertEqual(a::remove($this->arr, 'cat'), array('dog' => 'wuff', 'bird' => 'tweet')); }