Re: Class constants

From: Date: Mon, 19 Apr 2010 20:34:34 +0000
Subject: Re: Class constants
References: 1 2 3 4 5 6  Groups: php.general 
Request: Send a blank email to php-general+get-304237@lists.php.net to get a copy of this message
On Mon, Apr 19, 2010 at 7:25 AM, Peter Lind <peter.e.lind@gmail.com> 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.

« previous php.general (#304237) next »