Type Definition ext_php_rs::bindings::HashTable [−][src]
pub type HashTable = _zend_array;
Implementations
Creates a new, empty, PHP associative array with an initial size.
Parameters
size
- The size to initialize the array with.
Attempts to retrieve a value from the hash table with a string key.
Parameters
key
- The key to search for in the hash table.
Returns
Some(&Zval)
- A reference to the zval at the position in the hash table.None
- No value at the given position was found.
Attempts to retrieve a value from the hash table with an index.
Parameters
key
- The key to search for in the hash table.
Returns
Some(&Zval)
- A reference to the zval at the position in the hash table.None
- No value at the given position was found.
Attempts to remove a value from the hash table with a string key.
Parameters
key
- The key to remove from the hash table.
Returns
Some(())
- Key was successfully removed.None
- No key was removed, did not exist.
Attempts to remove a value from the hash table with a string key.
Parameters
key
- The key to remove from the hash table.
Returns
Ok(())
- Key was successfully removed.None
- No key was removed, did not exist.
Attempts to insert an item into the hash table, or update if the key already exists. Returns nothing in a result if successful.
Parameters
key
- The key to insert the value at in the hash table.value
- The value to insert into the hash table.
Inserts an item into the hash table at a specified index, or updates if the key already exists. Returns nothing in a result if successful.
Parameters
key
- The index at which the value should be inserted.val
- The value to insert into the hash table.
Pushes an item onto the end of the hash table. Returns a result containing nothing if the element was sucessfully inserted.
Parameters
val
- The value to insert into the hash table.
Returns an iterator over the key(s) and value contained inside the hashtable.