PHP7 kernel analysis
原创内容,转载请注明出处~
代码版本:php-7.0.12
feedback
Communicate & complain about error feedback
Paper version
Jingdong Dangdang
Table of contents:
- Chapter 1 Basic Architecture of PHP
- 1.1 Introduction to PHP
- 1.2 Improvements in PHP7
- 1.3 FPM
- 1.3.1 Overview
- 1.3.2 Basic implementation
- 1.3.3 Initialization of FPM
- 1.3.4 Request processing
- 1.3.5 Process Management
- 1.4 Several stages of PHP execution
- Chapter 2 Variables
- 2.1 Internal implementation of variables
- 2.2 Array
- 2.3 Static variables
- 2.4 Global variables
- 2.5 Constants
- Chapter 3 Zend Virtual Machine
- 3.1 Compilation of PHP code
- 3.1.1 Lexical analysis and syntax analysis
- 3.1.2 Abstract syntax tree compilation process
- 3.2 Function implementation
- 3.2.1 Internal functions
- 3.2.2 Implementation of user functions
- 3.3 Zend engine execution process
- 3.3.1 Basic structure
- 3.3.2 Execution process
- 3.3.3 Function execution flow
- 3.3.4 Global execute_data and opline
- 3.4 Object-oriented implementation
- 3.4.1 Class
- 3.4.2 Objects
- 3.4.3 Inheritance
- 3.4.4 Dynamic properties
- 3.4.5 Magic methods
- 3.4.6 Automatic loading of classes
- 3.5 Runtime caching
- 3.6 Opcache
- 3.6.1 opcode cache
- 3.6.2 opcode optimization
- 3.6.3 JIT
- Chapter 4 PHP basic syntax implementation
- 4.1 Type conversion
- 4.2 Select structure
- 4.3 Loop structure
- 4.4 Interrupts and jumps
- 4.5 include/require
- 4.6 Exception handling
- Chapter 5 Memory Management
- 5.1 Zend memory pool
- 5.2 Garbage collection
- Chapter 6 Thread Safety
- 6.1 What is thread safety?
- 6.2 Thread-safe resource manager
- Chapter 7 Extended Development
- 7.1 Overview
- 7.2 Implementation principle of extension
- 7.3 Extension composition and compilation
- 7.3.1 Extension composition
- 7.3.2 Compilation tools
- 7.3.3 Basic steps for writing extensions
- 7.3.4 config.m4
- 7.4 Hook function
- 7.5 Runtime configuration
- 7.5.1 Global variables
- 7.5.2 ini configuration
- 7.6 Functions
- 7.6.1 Internal function registration
- 7.6.2 Function parameter analysis
- 7.6.3 Parameter passing by reference
- 7.6.4 Function return value
- 7.6.5 Function call
- 7.7 Operation of zval
- 7.7.1 Newly generate various types of zval
- 7.7.2 Get the value and type of zval
- 7.7.3 Type conversion
- 7.7.4 Reference counting
- 7.7.5 String operations
- 7.7.6 Array operations
- 7.8 Constants
- 7.9 Object-oriented
- 7.9.1 Internal class registration
- 7.9.2 Define member attributes
- 7.9.3 Defining member methods
- 7.9.4 Defining constants
- 7.9.5 Instantiation of classes
- 7.10 Resource Types
- 7.11 Classic extension analysis
- Chapter 8 Namespaces
- 8.1 Overview
- 8.2 Definition of namespace
- 8.2.1 Definition syntax
- 8.2.2 Internal implementation
- 8.3 Use of namespaces
- 8.3.1 Basic usage
- 8.3.2 use import
- 8.3.3 Dynamic usage
Implement new PHP features
- 1. Break/continue is implemented according to label interruption syntax
- 2. defer syntax
- 3. Coroutine
- 3.1 Principle of coroutine
- 3.2 Context switching