public function pushValue($val)
{
if (is_array($this->ptr)) {
$this->ptr[] = $val;
} else {
$this->ptr = $val;
}
start:
if (sizeof($this->ptr) < $this->levelLength) {
return;
}
array_pop($this->stack);
if (!sizeof($this->stack)) {
$this->levelLength = null;
$this->onPacket();
$this->ptr =& $dummy;
$this->ptr = null;
return;
}
$this->ptr =& $dummy;
list($this->ptr, $this->levelLength) = end($this->stack);
goto start;
}