Re: limits on variable/classname length

From: Date: Sun, 26 Oct 2003 05:14:52 +0000
Subject: Re: limits on variable/classname length
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-167607@lists.php.net to get a copy of this message
Hmmm I _think_ it depends on size_t, which (IIRC) is typically typdef'd as an unsigned long int. I say that because there are macros (like ZEND_SET_SYMBOL) that do strlen(name) all over the place. Here's an except from limits.h: /* Maximum value an `unsigned long int' can hold. (Minimum is 0.) */ # if __WORDSIZE == 64 # define ULONG_MAX 18446744073709551615UL # else # define ULONG_MAX 4294967295UL # endif On Saturday 25 October 2003 09:36 pm, Greg Beaver wrote: > Hi, > > Are there any limits on the length a variable or classname may be in > PHP? I was unable to find anything in the manual, and my tests found > that a variable over 2000 characters long still caused no error or > problems. > > This is important because phpDocumentor 2.0 will be using a database to > cache parsed data, and I need to know how much space to allocate for the > names of classes and other things. > > Greg -- Evan Nemerson evan@coeus-group.com -- "The people are the only sure reliance for preservation of our liberty." -Thomas Jefferson

« previous php.general (#167607) next »