Re: Class constants

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

 



On Mon, Apr 19, 2010 at 7:25 AM, Peter Lind <peter.e.lind@xxxxxxxxx> wrote:

> Per the PHP manual: "The value must be a constant expression". Is
> something that depends on other classes, variables or functions
> constant?
>

When I came up against this problem myself, I read "a constant expression"
to mean "an expression involving only constants". I think that's a fairly
reasonable parse of the phrase. Thus I expected to be able to combine other
constants using the dot operator as Gary is trying to do. Obviously, it
didn't work, and I removed the "base" constant and replicated its value in
the other constants--a situation constants were designed to obviate.

Gary, you'd probably be better off asking for the technical reason behind
this limitation on a -devel list. :)
--
David Harkness
Senior Software Engineer
High Gear Media, Inc.

[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