code: public function write($uid, $mixed) {
          if (!is_int($uid) && !is_numeric($uid)) {
              throw new Exception\RuntimeException('Segment type key must integer or numeric.');
          }
          $this->alloc();
          return shm_put_var($this->memory, $uid, $mixed);
      }
docs: Write datas on $uid key
  @param mixed $uid
  @param mixed $mixed