<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>C/C++ &#8211; HU Xiaoxu</title>
	<atom:link href="https://blog.ihuxu.com/category/computer-science/computer-language/c-or-cpp/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.ihuxu.com</link>
	<description>a software engineer&#039;s blog</description>
	<lastBuildDate>Mon, 30 Jun 2025 03:41:39 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.6.2</generator>
	<item>
		<title>New Features from C++20 Release</title>
		<link>https://blog.ihuxu.com/new-features-from-c20-release/</link>
					<comments>https://blog.ihuxu.com/new-features-from-c20-release/#respond</comments>
		
		<dc:creator><![CDATA[HU Xiaoxu]]></dc:creator>
		<pubDate>Mon, 30 Jun 2025 12:40:00 +0000</pubDate>
				<category><![CDATA[C/C++]]></category>
		<category><![CDATA[Computer Language]]></category>
		<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[C++]]></category>
		<guid isPermaLink="false">https://blog.ihuxu.com/?p=12609</guid>

					<description><![CDATA[I recently did a quick study of the new features introduced in C++20, and I’d like to summarize what I’ve learned here. Core Languages Enhancements constinit &#38; consteval &#38; enhanced constexpr The above three keywords enable code to be evaluated or initialized at compile time. The main goal of these keywords, from my perspective, are shown as following: template parameters in lambadas As shown in the code snippet above, templates<div class="read-more"><a class="btn read-more-btn" href="https://blog.ihuxu.com/new-features-from-c20-release/">Read More</a></div>]]></description>
		
					<wfw:commentRss>https://blog.ihuxu.com/new-features-from-c20-release/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>PHP Internals Book 中文版 &#8211; Zvals &#8211; 基础结构</title>
		<link>https://blog.ihuxu.com/php-internals-book-in-chinese-zvals-basic-structure/</link>
					<comments>https://blog.ihuxu.com/php-internals-book-in-chinese-zvals-basic-structure/#respond</comments>
		
		<dc:creator><![CDATA[HU Xiaoxu]]></dc:creator>
		<pubDate>Wed, 08 Mar 2017 11:28:50 +0000</pubDate>
				<category><![CDATA[C/C++]]></category>
		<category><![CDATA[Computer Language]]></category>
		<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Original]]></category>
		<category><![CDATA[ZEND]]></category>
		<category><![CDATA[ZVAL]]></category>
		<guid isPermaLink="false">http://blog.ihuxu.com/?p=9488</guid>

					<description><![CDATA[基础结构 一个 zval（“Zend value”的缩写）代表一个任意类型的 PHP 变量。所以，它很可能是 PHP 中最重要的数据结构，同时你将会频繁地使用它。本章节讲述zvals的基础概念及其使用方法。 类型和值 每一个 zval 都会存储某个值和其对应的类型。这点非常重要，因为 PHP 是一门动态类型语言，所以变量的类型只有当运行时才会确定，并不是在编译时就能够确定。此外，zval 的类型在其生命周期是可以改变的，所以如果这个 zval 在最初存储了一个整形，那么在之后的某个时间点他也可能会存储了一个字符串。 类型是存储在一个整形的标签中（一个 unsigned char 类型的变量）。它有 8 中类型的值，分别对应着 PHP 中的 8 中变量类型。这些值可以用诸如 IS_TYPE 形式的常量来使用。比如：IS_NULL 对应 null 类型，IS_STRING 对应字符串类型。 真实的值是存储在一个联合体中，如下所示： 写给那些不了解联合体概念的同学：一个联合体定义了多个不同类型的成员，但是在某一刻只能使用其中一个成员。比如：如果给 value.lval 成员赋值了，那么你就需要用 value.lval 的方式来访问这个值，而不能用其他成员（否则会侵犯“strict aliasing”规则，并导致未定义的行为 &#8211; undefined behaviour）。这是因为联合体将其所有成员存储再一个相同的内存地址中，并根据访问的是哪一个成员来访问值。联合体的大小由其中的最大的成员决定。 在使用 zvals 时，类型标签用来寻找正在使用的是联合体中的哪一个成员。在介绍一些相关的 APIs 之前，我们先来大致过一下 PHP 支持的不同类型及其存储方式。 最简单的类型是 IS_NULL：事实上不需要存储任何值，因为它本身就保留一个 null 值。 为了存储数字，PHP 提供了 IS_LONG 和 IS_DOUBLE 类型，它们分别用于表达 long lval 和 double dval 两种成员。前者用于存储整形，然而后者用于存储浮点型数字。 针对于 long 类型有一些应该注意的事情：首先，这是一个有符号的整形类型，比如：他可以存储正数和负数，但是通常来说不适用于做一些位操作。第二，long 类型在不同的平台上有不同的大小：在<div class="read-more"><a class="btn read-more-btn" href="https://blog.ihuxu.com/php-internals-book-in-chinese-zvals-basic-structure/">Read More</a></div>]]></description>
		
					<wfw:commentRss>https://blog.ihuxu.com/php-internals-book-in-chinese-zvals-basic-structure/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>PHP Internals Book 中文版 &#8211; Zvals</title>
		<link>https://blog.ihuxu.com/php-internals-book-in-chinese-zvals/</link>
					<comments>https://blog.ihuxu.com/php-internals-book-in-chinese-zvals/#respond</comments>
		
		<dc:creator><![CDATA[HU Xiaoxu]]></dc:creator>
		<pubDate>Wed, 08 Mar 2017 11:26:54 +0000</pubDate>
				<category><![CDATA[C/C++]]></category>
		<category><![CDATA[Computer Language]]></category>
		<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Original]]></category>
		<category><![CDATA[ZEND]]></category>
		<guid isPermaLink="false">http://blog.ihuxu.com/?p=9487</guid>

					<description><![CDATA[Zvals 本章节的主题为用来表达 PHP 变量的 zval 数据结构。我们将会围绕 zvals 的概念和如何在扩展开发中使用两方面来进行阐述。 目录 基础结构 类型和值 访问宏 赋值 内存管理 值语义和引用语义 引用计数和写时复制 分配并初始化 zvals 管理引用计数和 zval 销毁 复制 zvals 分离 zvals 类型转换和操作符 基础操作符 比较 类型转换]]></description>
		
					<wfw:commentRss>https://blog.ihuxu.com/php-internals-book-in-chinese-zvals/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>PHP Internals Book 中文版</title>
		<link>https://blog.ihuxu.com/php-internals-book-in-chinese/</link>
					<comments>https://blog.ihuxu.com/php-internals-book-in-chinese/#respond</comments>
		
		<dc:creator><![CDATA[HU Xiaoxu]]></dc:creator>
		<pubDate>Tue, 07 Mar 2017 05:18:42 +0000</pubDate>
				<category><![CDATA[C/C++]]></category>
		<category><![CDATA[Computer Language]]></category>
		<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Original]]></category>
		<guid isPermaLink="false">http://blog.ihuxu.com/?p=9484</guid>

					<description><![CDATA[文章目录 Github（更新最快） 你看到的是 PHP 内核中文版，翻译自 PHP Internals Book。 为什么要翻译 对技术的饥渴 对英语的热爱 方便汉语作为母语的人学习交流 官方网站 PHP Internals Book Github（更新最快） https://github.com/huxiaoxu2019/php-internals-book-in-chinese 关于作者 Hu Xiaoxu 内容目录 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<div class="read-more"><a class="btn read-more-btn" href="https://blog.ihuxu.com/php-internals-book-in-chinese/">Read More</a></div>]]></description>
		
					<wfw:commentRss>https://blog.ihuxu.com/php-internals-book-in-chinese/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
