Skip to content

Commit 6e5b9f4

Browse files
committed
update
1 parent 06499a6 commit 6e5b9f4

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

7/func.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ echo $a;
497497
498498
### 7.6.4 函数返回值
499499
调用内部函数时其返回值指针作为参数传入,这个参数为`zval *return_value`,如果函数有返回值直接设置此指针即可,需要特别注意的是设置返回值时需要增加其引用计数,举个例子来看:
500-
```c
500+
```c
501501
PHP_FUNCTION(my_func_1)
502502
{
503503
zval *arr;
@@ -510,8 +510,6 @@ PHP_FUNCTION(my_func_1)
510510
Z_ADDREF_P(arr);
511511

512512
//设置返回值为数组:
513-
//return_value->u1.type = IS_ARRAY;
514-
//return_value->value->arr = arr->value->arr;
515513
ZVAL_ARR(return_value, Z_ARR_P(arr));
516514
}
517515
```

0 commit comments

Comments
 (0)