Hey,
Edin pointed out that we no longer need to reserve the "main" keyword in
zend engine 2. As the main:: keyword was only reserved for the main::
namespace in the first place. We no longer have namespaces, therefore
we no longer need to reserve main.
Attached is a patch to zend_compile.c that removes main. I'll commit it
to zend_compile.c unless someone objects.
-Sterling
--
"A business that makes nothing but money is a poor kind of business."
- Henry Ford
Index: zend_compile.c
===================================================================
RCS file: /repository/ZendEngine2/zend_compile.c,v
retrieving revision 1.429
diff -u -r1.429 zend_compile.c
--- zend_compile.c 21 Jun 2003 21:56:06 -0000 1.429
+++ zend_compile.c 30 Jun 2003 20:13:58 -0000
@@ -2251,8 +2251,7 @@
zend_str_tolower(class_name->u.constant.value.str.val, class_name->u.constant.value.str.len);
- if (!(strcmp(class_name->u.constant.value.str.val, "main") && strcmp(class_name->u.constant.value.str.val, "self") &&
- strcmp(class_name->u.constant.value.str.val, "parent"))) {
+ if (!(strcmp(class_name->u.constant.value.str.val, "self") && strcmp(class_name->u.constant.value.str.val, "parent"))) {
zend_error(E_COMPILE_ERROR, "Cannot use '%s' as class name as it is reserved", class_name->u.constant.value.str.val);
}
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php