public function offsetSet($index, $newval)
    {
        if ($index === null) {
            $this[] = $newval;
        } else {
            parent::offsetSet($index, $newval);
        }
    }
public function offsetSet($index, $newval)
    {
        if ($index === null) {
            $this[] = $newval;
        } else {
            parent::offsetSet($index, $newval);
        }
    }
public function offsetSet ( $ index , $ newval ) { if ( $ index === null ) { $ this [ ] = $ newval ; } else { parent :: offsetSet ( $ index , $ newval ) ; } }
Set local variables, will be available only in this instance

@param string|int|null $index
@param mixed $newval

@return void
Set local variables will be available only in this instance