Index: Zend/zend_execute_API.c =================================================================== RCS file: /repository/ZendEngine2/zend_execute_API.c,v retrieving revision 1.331.2.19 diff -u -p -d -r1.331.2.19 zend_execute_API.c --- Zend/zend_execute_API.c 17 Mar 2006 08:47:41 -0000 1.331.2.19 +++ Zend/zend_execute_API.c 19 Apr 2006 22:15:59 -0000 @@ -1006,6 +1006,24 @@ ZEND_API int zend_lookup_class_ex(char * return FAILURE; } + if (strncmp(lc_name, "self", name_length) == 0) { + if (EG(active_op_array) && EG(active_op_array)->scope) { + *ce = &EG(active_op_array)->scope; + return SUCCESS; + } else { + return FAILURE; + } + } + + if (strncmp(lc_name, "parent", name_length) == 0) { + if (EG(active_op_array) && EG(active_op_array)->scope && EG(active_op_array)->scope->parent) { + *ce = &EG(active_op_array)->scope->parent; + return SUCCESS; + } else { + return FAILURE; + } + } + if (EG(in_autoload) == NULL) { ALLOC_HASHTABLE(EG(in_autoload)); zend_hash_init(EG(in_autoload), 0, NULL, NULL, 0);