|
Ds\Map::getReturns the value for a given key. Description
public mixed Ds\Map::get
( mixed
$key
[, mixed $default
] )Returns the value for a given key, or an optional default value if the key could not be found.
Caution
Be careful when using array syntax. Scalar keys will be coerced to
integers by the engine. For example, See Arrays. Parameters
Return Values
The value mapped to the given Errors/ExceptionsOutOfBoundsException if the key could not be found and a default value was not provided. ExamplesExample #1 Ds\Map::get example
<?php The above example will output something similar to: int(1) int(10) Example #2 Ds\Map::get example using array syntax
<?php The above example will output something similar to: int(1) |