]> granicus.if.org Git - php/commitdiff
- Change the automatically created variable $clone in __clone() to
authorAndi Gutmans <andi@php.net>
Tue, 5 Nov 2002 18:16:11 +0000 (18:16 +0000)
committerAndi Gutmans <andi@php.net>
Tue, 5 Nov 2002 18:16:11 +0000 (18:16 +0000)
- $that as discussed at the PHP Conference. If there are any objections
- alternative names please let me know. The reason for changing it from
- $clone is because $clone sounds as if it's the newly cloned object and
- not the old one.

Zend/zend_compile.c
Zend/zend_objects.c

index 3dcb506c16d787ab8a023bacae4524981cd38233..9d820d39dcf74c8b4f97b091582e06fe16d3e3e3 100644 (file)
@@ -2236,8 +2236,8 @@ void zend_do_fetch_property(znode *result, znode *object, znode *property TSRMLS
 
        if (CG(in_clone_method)) {
                if ((opline_ptr->op1.op_type == IS_CONST) && (opline_ptr->op1.u.constant.type == IS_STRING) &&
-                       (opline_ptr->op1.u.constant.value.str.len == (sizeof("clone")-1)) &&
-                       !memcmp(opline_ptr->op1.u.constant.value.str.val, "clone", sizeof("clone"))) {
+                       (opline_ptr->op1.u.constant.value.str.len == (sizeof("that")-1)) &&
+                       !memcmp(opline_ptr->op1.u.constant.value.str.val, "that", sizeof("that"))) {
                        if (CG(active_class_entry) && (opline.op2.op_type == IS_CONST)) {
                                if (zend_hash_exists(&CG(active_class_entry)->private_properties, opline.op2.u.constant.value.str.val, opline.op2.u.constant.value.str.len+1)) {
                                        char *priv_name;
index a6b7579350bba2c09a79c5077351a51b9107bad6..ec9f11d27bff799df9a16556965fb66849eb8462 100644 (file)
@@ -106,7 +106,7 @@ ZEND_API zend_object_value zend_objects_clone_obj(zval *zobject TSRMLS_DC)
                zend_hash_init(new_object->properties, 0, NULL, ZVAL_PTR_DTOR, 0);
 
                ZEND_INIT_SYMTABLE(&symbol_table);
-               ZEND_SET_SYMBOL(&symbol_table, "clone", old_obj);
+               ZEND_SET_SYMBOL(&symbol_table, "that", old_obj);
                
                call_user_function_ex(NULL, &new_obj, clone_func_name, &retval_ptr, 0, NULL, 0, &symbol_table TSRMLS_CC);