GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Contents
  • Introduction

This view

  • Original page
  • New address

GeezerVison is showing www.phpinternalsbook.com — Table Of Contents — PHP Internals Book

Table Of Contents¶

PHP 7 and PHP 8¶

  • Introduction
  • Using the PHP build system
    • Building PHP
      • Why not use packages?
      • Obtaining the source code
      • Build overview
      • The ./buildconf script
      • The ./configure script
      • make and make install
      • Running the test suite
      • Fixing compilation problems and make clean
    • Building PHP extensions
      • Loading shared extensions
      • Installing extensions from PECL
      • Adding extensions to the PHP source tree
      • Building extensions using phpize
      • Displaying information about extensions
  • Zvals
    • Basic structure
      • Types and values
      • The zval struct
      • Access macros
    • Memory management
      • Reference-counted values
      • Zval memory management
    • References
      • Reference semantics
      • Representation
      • Initializing references
      • Dereferencing and unwrapping
      • Indirect zvals
    • Casts and operations
      • Casts
      • Operations
  • Internal types
    • Strings
      • The zend_string API
      • smart_str API
      • PHP’s custom printf functions
    • The Resource type: zend_resource
      • What is the “Resource” type?
      • Resource types and resource destruction
      • Playing with resources
      • Reference counting resources
      • Persistent resources
    • HashTables: zend_array
    • Functions
      • PHP Callables
  • Classes and objects
    • Object handlers
      • An Overview
  • Extensions design
    • Learning the PHP lifecycle
      • The parallelism models
      • The PHP extensions hooks
      • Hooking by overwriting function pointers
    • A look into a PHP extension and extension skeleton
      • How the engine loads extensions
      • What is a PHP extension ?
      • Generating extension skeleton with scripts
      • New age of the extension skeleton generator
      • Publishing API
    • Registering and using PHP functions
      • zend_function_entry structure
      • Registering PHP functions
      • Declaring function arguments
      • The PHP function structure and API, in C
      • Adding tests
      • Playing with constants
      • A go with Hashtables (PHP arrays)
      • Managing references
    • Managing global state
      • Managing request globals
      • Using true globals
    • Publishing extension information
      • MINFO() hook
      • A note about the Reflection API
    • Hooks provided by PHP
      • Hooking into the execution of functions
      • Overwriting an Internal Function
      • Modifying the Abstract Syntax Tree (AST)
      • Hooking into Script/File Compilation
      • Notification when Error Handler is called
      • Notification when Exception is thrown
      • Hooking into eval()
      • Hooking into the Garbage Collector
      • Overwrite Interrupt Handler
      • Replacing Opcode Handlers
    • Declaring and using INI settings
      • Reminders on INI settings
      • Zoom on INI settings
      • Registering and using INI entries
      • Validators and globals memory bridge
      • Using a displayer
    • Zend Extensions
      • On differences between PHP and Zend extensions
      • What is a Zend extension ?
      • Why need a Zend extension ?
      • API versions and conflicts management
      • Zend extensions lifetime hooks
      • Practice : my first example Zend extension
      • Hybrid extensions
  • Memory management
    • Zend Memory Manager
      • The two main kind of dynamic memory pools in PHP
      • Zend Memory Manager API
      • Zend Memory Manager debugging shields
      • Lifecycle
      • ZendMM internal design
      • Hooking into the ZendMM
      • Common errors and mistakes
    • Debugging memory
      • A quick note about valgrind
      • Before starting
      • Runtime ZendMM debugging
      • Memory leak detection example
      • Buffer overflow/underflow detection
      • Conclusions
  • Zend engine
    • Zend Compiler
    • Zend Executor
    • Zend opcache
  • Debugging with GDB
    • Debug symbols
    • Debugging the VM

PHP 5¶

  • Introduction
  • Using the PHP build system
    • Building PHP
    • Building PHP extensions
  • Creating PHP extensions

  • Zvals
    • Basic structure
    • Memory management
    • Casts and operations
  • Implementing functions

  • Hashtables
    • Basic structure
    • Hashtable API
    • Symtable and array API
    • Hash algorithm and collisions
  • Classes and objects
    • Simple classes
    • Custom object storage
    • Implementing typed arrays
    • Object handlers
    • Iterators
    • Serialization
    • Magic interfaces - Comparable
    • Internal structures and implementation

Testing PHP Source¶

Writing tests applies to both PHP 5 & PHP 7.

  • Testing with .phpt files
    • @TODO
  • Testing overview
    • Black-box testing
    • Where the test files live
  • Running the test suite
    • Running tests directly with run-tests.php
    • Running tests via the Makefile (recommended)
    • Executing tests in parallel
    • More options
  • The .phpt file structure
    • A basic test example
    • Some notable sections
    • Writing a simple test
  • Examining failed test output
    • Failed test output files
    • Examine failed test output inline

Index and search¶

  • Index

  • Search Page

The repository for this book is available on GitHub.

Creative Commons License
The PHP internals book is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.