Tag

zval

0 views collected around this technical thread.

php中文网 Courses
php中文网 Courses
May 27, 2022 · Backend Development

Understanding the PHP zval Structure in the Source Code

This article examines how PHP stores variables internally by analyzing the zval structure defined in the C source code, detailing its fields, type flags, memory layout, and associated macros, and explains why each variable occupies 16 bytes at runtime.

C++InternalsPHP
0 likes · 8 min read
Understanding the PHP zval Structure in the Source Code
php中文网 Courses
php中文网 Courses
Jul 1, 2021 · Backend Development

Understanding PHP 7.4 zval and zend_string Internals with GDB Debugging

This tutorial walks through PHP 7.4’s internal zend_string and zval structures, explains their role in binary‑safe strings and copy‑on‑write memory management, and demonstrates step‑by‑step debugging with GDB to inspect variable states and reference counts.

GDBPHPbackend
0 likes · 14 min read
Understanding PHP 7.4 zval and zend_string Internals with GDB Debugging
Refining Core Development Skills
Refining Core Development Skills
Nov 13, 2019 · Backend Development

Memory Optimizations in PHP7: Changes to zval and HashTable Structures

The article analyzes PHP7's memory optimizations by comparing the zval and HashTable structures of PHP 5.3 and PHP 7.2, showing how reduced sizes and better cache‑line alignment lead to significant performance improvements.

HashTableMemory OptimizationPHP
0 likes · 7 min read
Memory Optimizations in PHP7: Changes to zval and HashTable Structures