From 66505547ac5a3ff13c0399d62e64dd51750682fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?mc=C2=B2?= Date: Mon, 26 Mar 2018 17:53:21 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复 严格的将 => 严格的说 --- 2/static_var.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/2/static_var.md b/2/static_var.md index d382cb4..c134cf2 100644 --- a/2/static_var.md +++ b/2/static_var.md @@ -87,7 +87,7 @@ if (by_ref) { * __ZEND_FETCH_W:__ 这条opcode对应的操作是创建一个IS_INDIRECT类型的zval,指向static_variables中对应静态变量的zval * __ZEND_ASSIGN_REF:__ 它的操作是引用赋值,即将一个引用赋值给CV变量 -通过上面两条opcode可以确定静态变量的读写过程:首先根据变量名在static_variables中取出对应的zval,然后将它修改为引用类型并赋值给局部变量,也就是说`static $count = 4;`包含了两个操作,严格的将`$count`并不是真正的静态变量,它只是一个指向静态变量的局部变量,执行时实际操作是:`$count = & static_variables["count"];`。上面例子$count与static_variables["count"]间的关系如图所示。 +通过上面两条opcode可以确定静态变量的读写过程:首先根据变量名在static_variables中取出对应的zval,然后将它修改为引用类型并赋值给局部变量,也就是说`static $count = 4;`包含了两个操作,严格的说`$count`并不是真正的静态变量,它只是一个指向静态变量的局部变量,执行时实际操作是:`$count = & static_variables["count"];`。上面例子$count与static_variables["count"]间的关系如图所示。 ![](../img/zend_static_ref.png) From 217ea91e703df8cbfacb872ad7a6259e07d4aa89 Mon Sep 17 00:00:00 2001 From: smalleyes Date: Wed, 25 Apr 2018 18:04:16 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=A0=A1=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 3/zend_class.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3/zend_class.md b/3/zend_class.md index f67783b..62eea77 100644 --- a/3/zend_class.md +++ b/3/zend_class.md @@ -1,7 +1,7 @@ ### 3.4.1 类 类是现实世界或思维世界中的实体在计算机中的反映,它将某些具有关联关系的数据以及这些数据上的操作封装在一起。在面向对象中类是对象的抽象,对象是类的具体实例。 -在PHP中类编译阶段的产物,而对象是运行时产生的,它们归属于不同阶段。 +在PHP中类是编译阶段的产物,而对象是运行时产生的,它们归属于不同阶段。 PHP中我们这样定义一个类: ```php From 124d6bc9bbf5abc5a3671bfc005b46bcec099252 Mon Sep 17 00:00:00 2001 From: qinpeng Date: Tue, 10 Jul 2018 17:34:12 +0800 Subject: [PATCH 3/4] update doc --- README.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 95dcbb4..566fac0 100644 --- a/README.md +++ b/README.md @@ -115,7 +115,10 @@ * [8.3.2 use导入](8/namespace.md) * [8.3.3 动态用法](8/namespace.md) -## 附录 - * [附录1:break/continue按标签中断语法实现](try/break.md) - * 附录2:defer推迟函数调用语法的实现 +## 实现PHP新特性 + * [1、break/continue按标签中断语法实现](try/break.md) + * 2、defer语法 + * 3、协程 + * 3.1 协程的原理 + * 3.2 上下文切换 From 860410be29627212b5dbd485664ace2d4e6188b3 Mon Sep 17 00:00:00 2001 From: Ching-Ping Sun <252880+tomjpsun@users.noreply.github.com> Date: Fri, 18 Jan 2019 17:29:42 +0800 Subject: [PATCH 4/4] fix example typo --- 7/extension_intro.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/7/extension_intro.md b/7/extension_intro.md index f6aafc8..020a179 100644 --- a/7/extension_intro.md +++ b/7/extension_intro.md @@ -270,7 +270,7 @@ __(5)PHP_ADD_INCLUDE(path):__ 添加include路径,即:`gcc -Iinclude_dir`, __(6)PHP_CHECK_LIBRARY(library, function [, action-found [, action-not-found [, extra-libs]]]):__ 检查依赖的库中是否存在需要的function,action-found为存在时执行的动作,action-not-found为不存在时执行的动作,比如扩展里使用到线程pthread,检查pthread_create(),如果没找到则终止./configure执行: ```sh -PHP_ADD_INCLUDE(pthread, pthread_create, [], [ +PHP_CHECK_LIBRARY(pthread, pthread_create, [], [ AC_MSG_ERROR([not find pthread_create() in lib pthread]) ]) ```