|
Ds\Map::getReturns the value for a given key. Beschreibung
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.
Achtung
Be careful when using array syntax. Scalar keys will be coerced to
integers by the engine. For example, See Arrays. Parameter-Liste
Rückgabewerte
The value mapped to the given Fehler/ExceptionsOutOfBoundsException if the key could not be found and a default value was not provided. BeispieleBeispiel #1 Ds\Map::get example
<?phpDas oben gezeigte Beispiel erzeugt eine ähnliche Ausgabe wie: int(1) int(10) Beispiel #2 Ds\Map::get example using array syntax
<?phpDas oben gezeigte Beispiel erzeugt eine ähnliche Ausgabe wie: int(1) |