Re: Has this always been the case?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 31 May 2013, at 12:17, shiplu <shiplu.net@xxxxxxxxx> wrote:

> On Fri, May 31, 2013 at 5:12 PM, Stuart Dallas <stuart@xxxxxxxx> wrote:
>> That is not entirely correct. It must be a literal value. The expression 'a'.'b' is a constant value.
>> I may be being overly picky here, but I think it's an important distinction.
>> 
> 
> I thought 'a'. 'b' is a constant expression and 'ab' is a constant value. Correct me if I am wrong. 

You're correct that 'a'.'b' is a constant expression, but I wouldn't call 'ab' a constant value, it's a literal [1]. While "constant value" makes logical sense there is a long history of agreed terminology for these things and you will find that using it will enable smoother communication with fellow developers.

Initial values of class constants and member variables must be literals as they are defined not evaluated.

-Stuart

[1] http://en.wikipedia.org/wiki/Literal_(computer_programming)

-- 
Stuart Dallas
3ft9 Ltd
http://3ft9.com/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php






[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux