Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:41951 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 31927 invoked from network); 16 Nov 2008 13:51:26 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Nov 2008 13:51:26 -0000 Authentication-Results: pb1.pair.com header.from=karpeles@ookoo.org; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=karpeles@ookoo.org; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ookoo.org designates 88.191.88.38 as permitted sender) X-PHP-List-Original-Sender: karpeles@ookoo.org X-Host-Fingerprint: 88.191.88.38 lamune.ookoo.org Linux 2.6 Received: from [88.191.88.38] ([88.191.88.38:35087] helo=Lamune.ookoo.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A0/93-13764-C5520294 for ; Sun, 16 Nov 2008 08:51:25 -0500 Received: (pmaild 938546 invoked for user karpeles@ookoo.org); Sun, 16 Nov 2008 14:51:13 +0100 Received: from [192.168.0.25] (30.3.207-77.rev.gaoland.net [77.207.3.30]) by Lamune.ookoo.org (phpinetd by MagicalTux ) with SMTP version 1.0; Sun, 16 Nov 2008 14:51:12 +0100 To: Chris Jiang Cc: internals@lists.php.net In-Reply-To: <492021AB.9040106@gmail.com> References: <56.41.13764.40D10294@pb1.pair.com> <1226841630.14940.26.camel@localhost> <492021AB.9040106@gmail.com> Content-Type: text/plain; charset=utf-8 Organization: ooKoo.org Date: Sun, 16 Nov 2008 14:51:12 +0100 Message-ID: <1226843472.14940.39.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] Can someone explain me why this happens please? From: karpeles@ookoo.org ("M." =?ISO-8859-1?Q?Karpel=E8s?=) Le dimanche 16 novembre 2008 à 21:35 +0800, Chris Jiang a écrit : > Still, this is a really strange experience. Where are those characters > come from? Shouldn't it be a clean array when I first created them? > Anything related to the zval structure? This is not PHP-related. When you *define* a variable, it has no content, you have to initialize it. The characters you got are from the uninitialized space you used in the stack. C won't initialize variables for you as it would be a waste of time in the case you already initialize it with a non-NULL value. Anyway as this is not PHP-related, I suggest this discussion to be continued outside of the PHP internals mailing list, if you have any question, I can probably give you some pointers to good documentation, just need to understand what you are trying to do. Best regards, Mark