Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:56950 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 46504 invoked from network); 19 Dec 2011 20:24:04 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Dec 2011 20:24:04 -0000 Authentication-Results: pb1.pair.com header.from=dragoonis@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=dragoonis@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.170 as permitted sender) X-PHP-List-Original-Sender: dragoonis@gmail.com X-Host-Fingerprint: 209.85.216.170 mail-qy0-f170.google.com Received: from [209.85.216.170] ([209.85.216.170:38398] helo=mail-qy0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F6/11-38867-26D9FEE4 for ; Mon, 19 Dec 2011 15:24:03 -0500 Received: by qcsd16 with SMTP id d16so3571960qcs.29 for ; Mon, 19 Dec 2011 12:23:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=65tlFzYOqp6fhtfY/f460z9xMbd+a2YIP4QID03Zrks=; b=NRjmbJjDsQ1kwCALvYx0sdcPg0okw25R6KlusMlr4bhj9aBm3pUxGOwW8Kjr3nTeON Vs2o4i92k+0l2dIx5BYCq94mwY8rTiI9vJ+s4drS0cEAqlZb1OhtpI/kes0U6gMgG0hy cklEqxFT+tRlFLVsMIXcjmD3uJj8Kr0KAdF0w= MIME-Version: 1.0 Received: by 10.229.77.79 with SMTP id f15mr6244097qck.104.1324326239198; Mon, 19 Dec 2011 12:23:59 -0800 (PST) Received: by 10.229.39.72 with HTTP; Mon, 19 Dec 2011 12:23:59 -0800 (PST) In-Reply-To: <4EEF9C79.4090104@gmail.com> References: <4EEF9C79.4090104@gmail.com> Date: Mon, 19 Dec 2011 20:23:59 +0000 Message-ID: To: "Barbu Paul Gh." Cc: internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] Constant arrays From: dragoonis@gmail.com (Paul Dragoonis) Barbu, This is how constants work in all viable languages such as C/++. They are not 'variables of data', they contain scalar values so that you can have a maintainable source for your value to refer to later. http://msdn.microsoft.com/en-us/library/357syhfh(v=vs.80).aspx I believe constants come from the philosophy of 'enums' in C. Just google some more on it. Regards, - Paul. On Mon, Dec 19, 2011 at 8:20 PM, Barbu Paul Gh. wrote: > Hello! > > I wonder why I cannot assign arrays to constants. > According to the PHP manual: > "only scalar and null values are allowed. Scalar values are integer, float, > string or boolean values." > > What is the mechanism behind this? > What's the explanation? > > -- > > Common sense is not so common - Voltaire > http://tweak-it.tk/ - Personal portfolio and web-log - Barbu Paul - Gh. > Visit My GitHub profile to see my open-source projects - > https://github.com/paullik > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php >