Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:56951 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 48739 invoked from network); 19 Dec 2011 20:43:39 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Dec 2011 20:43:39 -0000 Authentication-Results: pb1.pair.com smtp.mail=keisial@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=keisial@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.42 as permitted sender) X-PHP-List-Original-Sender: keisial@gmail.com X-Host-Fingerprint: 74.125.82.42 mail-ww0-f42.google.com Received: from [74.125.82.42] ([74.125.82.42:33553] helo=mail-ww0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 37/71-38867-AF1AFEE4 for ; Mon, 19 Dec 2011 15:43:39 -0500 Received: by wgbds13 with SMTP id ds13so7660900wgb.5 for ; Mon, 19 Dec 2011 12:43:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=h7K8qm1fbfCvVpt5BOOgGSuG8BBIVO4KM1TMjB8UWZ0=; b=eWLT36JZE5iXa8HB92re+SSmXqJtQz7sbfJnir+MdupqzrFQZsUkuk0LGBL7VpkxOB OdaYp4VDWRPp82pM7GEx4yj+eduGoYKdKpW1s6ciAMPZUZng5Z2bUw23Pe4WJAslW3ny gIbEhShwaNnr2I66U0nfcaxD5gVt5Xh15+eMQ= Received: by 10.181.12.43 with SMTP id en11mr2006080wid.6.1324327416276; Mon, 19 Dec 2011 12:43:36 -0800 (PST) Received: from [192.168.1.26] ([80.28.75.124]) by mx.google.com with ESMTPS id m13sm27110708wbh.0.2011.12.19.12.43.34 (version=SSLv3 cipher=OTHER); Mon, 19 Dec 2011 12:43:35 -0800 (PST) Message-ID: <4EEFA2EF.10303@gmail.com> Date: Mon, 19 Dec 2011 21:47:43 +0100 User-Agent: Thunderbird MIME-Version: 1.0 To: Paul Dragoonis CC: "Barbu Paul Gh." , internals@lists.php.net References: <4EEF9C79.4090104@gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Constant arrays From: keisial@gmail.com (=?ISO-8859-1?Q?=C1ngel_Gonz=E1lez?=) On 19/12/11 21:23, Paul Dragoonis wrote: > Barbu, > > This is how constants work in all viable languages such as C/++. I disagree. In C you can have: const data foo[] = { { "Data1", 2 }, { "Data2", 78 } }; It's not unusual in php to have a complex structure that won't change in a variable. It should be an array, but as array is not allowed as content, you need to leave it as a static variable that you won't never change.