OPCODE的功能列表

大兄弟 2017年08月13日0   296
Opcode代码ver含义
ZEND_NOP0
空操作
ZEND_ADD1
ZEND_SUB2
ZEND_MUL3
ZEND_DIV4
ZEND_MOD5
求模
ZEND_SL6
左移位 Shift Left
ZEND_SR7
右移位 Shift Right
ZEND_CONCAT8
字符串连接
ZEND_BW_OR9
按位或
ZEND_BW_AND10
按位与
ZEND_BW_XOR11
按位异或
ZEND_BW_NOT12
按位非
ZEND_BOOL_NOT13
逻辑非!
ZEND_BOOL_XOR14
逻辑异或 XOR
ZEND_IS_IDENTICAL15
===
ZEND_IS_NOT_IDENTICAL16
!==
ZEND_IS_EQUAL17
==
ZEND_IS_NOT_EQUAL18
<>,!=
ZEND_IS_SMALLER19
ZEND_IS_SMALLER_OR_EQUAL20
<=
ZEND_CAST21
类型强制转换,目标类型extend_value
ZEND_QM_ASSIGN22
?: 操作赋值
ZEND_ASSIGN_ADD23
+=
ZEND_ASSIGN_SUB24
-=
ZEND_ASSIGN_MUL25
*=
ZEND_ASSIGN_DIV26
/=
ZEND_ASSIGN_MOD27
%=
ZEND_ASSIGN_SL28
<<=
ZEND_ASSIGN_SR29
>>=
ZEND_ASSIGN_CONCAT30
.=
ZEND_ASSIGN_BW_OR31
|=
ZEND_ASSIGN_BW_AND32
&=
ZEND_ASSIGN_BW_XOR33
^=
ZEND_PRE_INC34
++前自增 ++$a
ZEND_PRE_DEC35
--前自减 --$a
ZEND_POST_INC36
后自增++ $a ++
ZEND_POST_DEC37
后自减-- $a--
ZEND_ASSIGN38
赋值=
ZEND_ASSIGN_REF39
引用赋值 =&
ZEND_ECHO40
ECHO
ZEND_PRINT41
PRINT
ZEND_JMP42
无条件跳转指令
ZEND_JMPZ43
条件跳转
ZEND_JMPNZ44

ZEND_JMPZNZ45

ZEND_JMPZ_EX46

ZEND_JMPNZ_EX47

ZEND_CASE48
CASE操作符
ZEND_SWITCH_FREE49
SWITCH
ZEND_BRK50
BREAK
ZEND_CONT51
CONTINUE
ZEND_BOOL52
BOOL转换
ZEND_INIT_STRING53
初始化字符串
ZEND_ADD_CHAR54
将字符加到字符串
ZEND_ADD_STRING55
将字符串加到字符串
ZEND_ADD_VAR56
将变量加到字符串
ZEND_BEGIN_SILENCE57
错误屏蔽开始
ZEND_END_SILENCE58
错误屏蔽结束
ZEND_INIT_FCALL_BY_NAME59
初始化通过名称调用函数
ZEND_DO_FCALL60
函数调用
ZEND_DO_FCALL_BY_NAME61
通过名称调用函数
ZEND_RETURN62
函数返回
ZEND_RECV63
函数声明时传递参数
ZEND_RECV_INIT64
函数声明时传递参数,用默认值初始化
ZEND_SEND_VAL65
函数调用时传递值作为参数
ZEND_SEND_VAR66
函数调用时传递变量作为参数
ZEND_SEND_REF67
函数调用时传递引用作为参数
ZEND_NEW68
new 操作
ZEND_INIT_NS_FCALL_BY_NAME695.3命名空间函数调用
ZEND_FREE70
free操作
ZEND_INIT_ARRAY71
数组初始化
ZEND_ADD_ARRAY_ELEMENT72
添加数组元素
ZEND_INCLUDE_OR_EVAL73
include/require/eval操作
ZEND_UNSET_VAR745.1UNSET操作
ZEND_UNSET_DIM755.1
ZEND_UNSET_OBJ765.1
ZEND_FE_RESET775.1FOREACH操作
ZEND_FE_FETCH78
FOREACH操作
ZEND_EXIT79
EXIT
ZEND_FETCH_R80
这一系列OPCODE用于获取各种类型的变量地址,分别用于不同的操作。R:只读,W:只写,RW:读写。DIM – 数组OBJ – 对象
ZEND_FETCH_DIM_R81

ZEND_FETCH_OBJ_R82

ZEND_FETCH_W83

ZEND_FETCH_DIM_W84

ZEND_FETCH_OBJ_W85

ZEND_FETCH_RW86

ZEND_FETCH_DIM_RW87

ZEND_FETCH_OBJ_RW88

ZEND_FETCH_IS89
取出变量地址,用于IS*测试。IS*测试指的是对变量进行ISSET 或ISEMPTY测试。
ZEND_FETCH_DIM_IS90

ZEND_FETCH_OBJ_IS91

ZEND_FETCH_FUNC_ARG92
获取函数参数地址
ZEND_FETCH_DIM_FUNC_ARG93

ZEND_FETCH_OBJ_FUNC_ARG94

ZEND_FETCH_UNSET95
获取变量地址,用于UNSET
ZEND_FETCH_DIM_UNSET96

ZEND_FETCH_OBJ_UNSET97

ZEND_FETCH_DIM_TMP_VAR98

ZEND_FETCH_CONSTANT995.0取得常量地址
ZEND_GOTO1005.3GOTO 操作
ZEND_EXT_STMT101
extension statement
ZEND_EXT_FCALL_BEGIN102
extension function call begin
ZEND_EXT_FCALL_END103
extension function call end
ZEND_EXT_NOP104
extension noop
ZEND_TICKS105
TICKS函数,5.3中过时,6.0取消
ZEND_SEND_VAR_NO_REF106
参数传递
ZEND_CATCH1075.0异常处理捕获异常
ZEND_THROW108
异常处理抛出异常
ZEND_FETCH_CLASS109
使用对象名称获取对象指针
ZEND_CLONE110
对象克隆
ZEND_INIT_METHOD_CALL112
对象方法调用初始化
ZEND_INIT_STATIC_METHOD_CALL113
对象静态方法调用初始化
ZEND_ISSET_ISEMPTY_VAR114
标量类型变量IS*测试
ZEND_ISSET_ISEMPTY_DIM_OBJ115
数组或对象类型变量IS*测试
ZEND_PRE_INC_OBJ132
对象属性前自增 ++$obj->prop
ZEND_PRE_DEC_OBJ133
对象属性前自减 --$obj->prop
ZEND_POST_INC_OBJ134
对象属性后自增 $obj->prop++
ZEND_POST_DEC_OBJ135
对象属性后自减 $obj->prop--
ZEND_ASSIGN_OBJ136
对象赋值
ZEND_INSTANCEOF138
instanceof操作符
ZEND_DECLARE_CLASS139
类声明
ZEND_DECLARE_INHERITED_CLASS140
继承类声明
ZEND_DECLARE_FUNCTION141
函数声明
ZEND_RAISE_ABSTRACT_ERROR142
实例化抽象类错误
ZEND_DECLARE_CONST1435.3常数声明
ZEND_ADD_INTERFACE144
类声明时添加接口
ZEND_DECLARE_INHERITED_CLASS_DELAYED145
声明继承类,使用delayed early binding
ZEND_VERIFY_ABSTRACT_CLASS146
抽象类验证
ZEND_ASSIGN_DIM147
数组元素赋值
ZEND_ISSET_ISEMPTY_PROP_OBJ148
对象属性IS*测试
ZEND_HANDLE_EXCEPTION149
异常处理
ZEND_USER_OPCODE1505.1用户自定义OPCODE处理器
ZEND_U_NORMALIZE1516.0规范化标识符名
ZEND_JMP_SET1525.3无条件跳转,并设置RESULT
ZEND_DECLARE_LAMBDA_FUNCTION1535.3声明LAMBDA函数