We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
类定义:
class Foo { protected $relations = []; protected $name = 2; /** * Set the specific relationship in the model. * * @param string $relation * @param mixed $value * @return $this */ public function setRelation($relation, $value) { $this->relations[$relation] = $value; return $this; } }
序列化方法
function encode($result) { $stream = new BytesIO(); $writer = new Writer($stream, false); $stream->write(Tags::TagResult); if (0 === ResultMode::Serialized) { $stream->write($result); } else { $writer->reset(); $writer->serialize($result); } $data = $stream->toString(); return $data; }
调用:
$foo = new Foo(); $foo_2 = new Foo(); $foo->setRelation('sublabel', [$foo_2]); var_dump(encode($foo));
会触发Segmentation fault, 调试了一下,里面的循环会影响到外面循环的nInternalPointer, 没再继续研究, 求助大佬帮忙看一下……^_^ (环境: php: 7.1.6, hprose: master版本也可以复现)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
类定义:
序列化方法
调用:
会触发Segmentation fault, 调试了一下,里面的循环会影响到外面循环的nInternalPointer, 没再继续研究, 求助大佬帮忙看一下……^_^
(环境: php: 7.1.6, hprose: master版本也可以复现)
The text was updated successfully, but these errors were encountered: