public function putIfAbsent($key, $value)
    {
        $currentValue = $this->get($key);

        if ($currentValue === null) {
            $this[$key] = $value;
        }

        return $currentValue;
    }
public function putIfAbsent($key, $value)
    {
        $currentValue = $this->get($key);

        if ($currentValue === null) {
            $this[$key] = $value;
        }

        return $currentValue;
    }
public function putIfAbsent ( $ key , $ value ) { $ currentValue = $ this -> get ( $ key ) ; if ( $ currentValue === null ) { $ this [ $ key ] = $ value ; } return $ currentValue ; }
Associates the specified value with the specified key in this map only if
it is not already set.

If there is already a value associated with `$key`, this returns that
value without replacing it.

@param mixed $key The key to put in the map.
@param mixed $value The value to store at `$key`.

@return mixed|null the previous value associated with key, or `null` if
there was no mapping for `$key`.
Associates the specified value with the specified key in this map only if it is not already set .