Next: Opcode Handlers, Previous: Operator Overloading, Up: Top [Contents]
Before a PHP script can be executed in Zend VM, it is compiled into arrays of
zend_op
s. Similar to machine codes, a zend_op
consists of an
instruction, at most two operands, and the operation result.
struct _zend_op { const void *handler; // Function pointer to opcode handler. znode_op op1; // First operand. znode_op op2; // Second operand. znode_op result; // Instruction result. uint32_t extended_value; // Extra data corresponding to this opline. uint32_t lineno; // Line numper of this opline. zend_uchar opcode; // Instruction code. zend_uchar op1_type; // Type of first operand. zend_uchar op2_type; // Type of second operand. zend_uchar result_type; // Type of instruction result. };
• Operands | Operands of a PHP opcode. | |
• Instructions | Instruction codes of a PHP opcode. | |
• Operand Types | Types of an operand. |