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. <paullik.p...@gmail.com> 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
>

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to