Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
=2.1 zval 写时复制 分离demo fix
  • Loading branch information
xiaoerli520 committed Sep 20, 2018
commit ac8b91b99d27690a60dce77ec206c8d641dfcc84
7 changes: 5 additions & 2 deletions 2/zval.md
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,11 @@ $a = array(1,2);
$b = &$a;
$c = $a;

//发生分离
$b[] = 3;
//因为引用 a b 没有分离
$b[] = 4;

//没有引用 a c 发生分离
$c[] = 3;
```
最终的结果:

Expand Down