[PHP] limits on variable/classname length

2003-10-25 Thread Greg Beaver
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

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


Re: [PHP] limits on variable/classname length

2003-10-25 Thread Evan Nemerson
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_MAX18446744073709551615UL
#  else
#   define ULONG_MAX4294967295UL
#  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
[EMAIL PROTECTED]

--
The people are the only sure reliance for preservation of our liberty.

-Thomas Jefferson

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