Re: Has this always been the case?

From: Date: Fri, 31 May 2013 11:25:59 +0000
Subject: Re: Has this always been the case?
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-321296@lists.php.net to get a copy of this message
On 31 May 2013, at 12:17, shiplu <shiplu.net@gmail.com> wrote: > On Fri, May 31, 2013 at 5:12 PM, Stuart Dallas <stuart@3ft9.com> 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/

« previous php.general (#321296) next »