Tagged articles
6 articles
Page 1 of 1
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.

BackendCinternals
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.

BackendCopy-on-Writegdb
0 likes · 14 min read
Understanding PHP 7.4 zval and zend_string Internals with GDB Debugging
21CTO
21CTO
Feb 23, 2017 · Backend Development

Inside PHP: Understanding the zval Structure and Memory Management

This article explains PHP's core zval structure, how different variable types are stored, and the mechanisms of reference counting, copy‑on‑write, and garbage collection that enable efficient memory management in the Zend engine.

BackendCopy-on-WriteMemory Management
0 likes · 12 min read
Inside PHP: Understanding the zval Structure and Memory Management
21CTO
21CTO
Nov 15, 2015 · Backend Development

Unveiling PHP’s Core: Architecture, Engine, and Memory Mechanics

This article demystifies PHP’s internal architecture, covering its design philosophy, four‑layer system, SAPI interfaces, execution flow with opcodes, the Zend hash table, variable handling via zval, reference counting, and resource management, providing a comprehensive guide for backend developers.

BackendResource Managementhash table
0 likes · 16 min read
Unveiling PHP’s Core: Architecture, Engine, and Memory Mechanics