 +		return;
 +	}
 +
-+	/* Create lowercase package name and concate a "~" */
++	/* Create lowercase package name and concatenate a "~" */
 +	if (package) {
 +		package_len++;
 +		lc_name = do_alloca(package_len + 1);

 	if ((hash_key->nKeyLength==0 || hash_key->arKey[0]!=0)
-		&& (comply_mask == (ce->ce_flags & mask))) {
+		&& (comply_mask == (ce->ce_flags & mask))
+        && (package ? 0 == memcmp(package, hash_key->arKey, MIN(hash_key->nKeyLength, package_len)) : 1)
+        ) {
 		add_next_index_stringl(array, ce->name, ce->name_length, 1);
 	}
 	return ZEND_HASH_APPLY_KEEP;

retrieving revision 1.151
diff -u -r1.151 zend_language_parser.y
--- Zend/zend_language_parser.y	4 Oct 2004 19:54:34 -0000	1.151
+++ Zend/zend_language_parser.y	3 Nov 2004 16:18:14 -0000
@@ -111,6 +111,7 @@
 %token T_TRY
 %token T_CATCH
