Hashtables

From: Date: Sat, 30 Nov 2002 18:28:33 +0000
Subject: Hashtables
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-91961@lists.php.net to get a copy of this message
Hey all I was playing around and I'm running into a problem with a hashtable... Basically, it's segfaulting my code :) Specifically, I'm trying to return the number of items in the hash... if(zend_hash_num_elements(hash) == 0) Which causes the following: Program received signal SIGSEGV, Segmentation fault. zend_hash_num_elements (ht=0x0) at /home/php/php4/Zend/zend_hash.c:988 988 return ht->nNumOfElements; Anyone know the steps I need to do in order for something like this to work? If it hasn't been initialized, how do I tell other than checking the elements? John

« previous php.dev (#91961) next »