felipe          Tue Mar 18 14:10:48 2008 UTC

  Removed files:               (Branch: PHP_5_3)
    /ZendEngine2/tests  bug30332.phpt bug31828.phpt bug32080.phpt 
                        bug32852.phpt bug33243.phpt bug34712.phpt 
                        bug34767.phpt 

  Modified files:              
    /php-src    NEWS 
    /ZendEngine2        zend.c zend_API.c zend_execute.c zend_execute.h 
                        zend_execute_API.c zend_globals.h zend_objects.c 
                        zend_operators.c zend_vm_def.h zend_vm_execute.h 
    /php-src/ext/dom    php_dom.c 
    /php-src/ext/simplexml      simplexml.c 
    /php-src/main       main.c 
  Log:
  MFH: Dropped zend.ze1_compatibility_mode
  [DOC]
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.145&r2=1.2027.2.547.2.965.2.146&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.145 
php-src/NEWS:1.2027.2.547.2.965.2.146
--- php-src/NEWS:1.2027.2.547.2.965.2.145       Tue Mar 18 08:36:27 2008
+++ php-src/NEWS        Tue Mar 18 14:10:42 2008
@@ -2,6 +2,7 @@
 |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 ?? ??? 20??, PHP 5.3.0
 - Removed the experimental RPL (master/slave) functions from mysqli. (Andrey)
+- Dropped zend.ze1_compatibility_mode (Dmitry)
 
 - Added concept of "delayed early binding" that allows opcode caches to perform
   class declaration (early and/or run-time binding) in exactly the same order
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend.c?r1=1.308.2.12.2.35.2.12&r2=1.308.2.12.2.35.2.13&diff_format=u
Index: ZendEngine2/zend.c
diff -u ZendEngine2/zend.c:1.308.2.12.2.35.2.12 
ZendEngine2/zend.c:1.308.2.12.2.35.2.13
--- ZendEngine2/zend.c:1.308.2.12.2.35.2.12     Tue Mar 18 08:36:28 2008
+++ ZendEngine2/zend.c  Tue Mar 18 14:10:43 2008
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: zend.c,v 1.308.2.12.2.35.2.12 2008/03/18 08:36:28 dmitry Exp $ */
+/* $Id: zend.c,v 1.308.2.12.2.35.2.13 2008/03/18 14:10:43 felipe Exp $ */
 
 #include "zend.h"
 #include "zend_extensions.h"
@@ -90,7 +90,6 @@
 ZEND_INI_BEGIN()
        ZEND_INI_ENTRY("error_reporting",                               NULL,   
        ZEND_INI_ALL,           OnUpdateErrorReporting)
        STD_ZEND_INI_BOOLEAN("zend.enable_gc",                          "1",    
ZEND_INI_ALL,           OnUpdateGCEnabled,      gc_enabled,     
zend_gc_globals,        gc_globals)
-       STD_ZEND_INI_BOOLEAN("zend.ze1_compatibility_mode",     "0",    
ZEND_INI_ALL,           OnUpdateBool,   ze1_compatibility_mode, 
zend_executor_globals,  executor_globals)
 ZEND_INI_END()
 
 
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_API.c?r1=1.296.2.27.2.34.2.31&r2=1.296.2.27.2.34.2.32&diff_format=u
Index: ZendEngine2/zend_API.c
diff -u ZendEngine2/zend_API.c:1.296.2.27.2.34.2.31 
ZendEngine2/zend_API.c:1.296.2.27.2.34.2.32
--- ZendEngine2/zend_API.c:1.296.2.27.2.34.2.31 Thu Mar  6 17:28:26 2008
+++ ZendEngine2/zend_API.c      Tue Mar 18 14:10:43 2008
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: zend_API.c,v 1.296.2.27.2.34.2.31 2008/03/06 17:28:26 tony2001 Exp $ */
+/* $Id: zend_API.c,v 1.296.2.27.2.34.2.32 2008/03/18 14:10:43 felipe Exp $ */
 
 #include "zend.h"
 #include "zend_execute.h"
@@ -153,34 +153,6 @@
        while (param_count-->0) {
                zval **value = (zval**)(p-arg_count);
 
-               if (EG(ze1_compatibility_mode) &&
-                       Z_TYPE_PP(value) == IS_OBJECT &&
-                       !Z_ISREF_PP(value)
-               ) {
-                       zval *value_ptr;
-                       char *class_name;
-                       zend_uint class_name_len;
-                       int dup;
-
-                       dup = zend_get_object_classname(*value, &class_name, 
&class_name_len TSRMLS_CC);
-
-                       ALLOC_ZVAL(value_ptr);
-                       *value_ptr = **value;
-                       INIT_PZVAL(value_ptr);
-                       zend_error(E_STRICT, "Implicit cloning object of class 
'%s' because of 'zend.ze1_compatibility_mode'", class_name);
-
-                       if (Z_OBJ_HANDLER_PP(value, clone_obj) == NULL) {
-                               zend_error(E_CORE_ERROR, "Trying to clone 
uncloneable object of class %s", class_name);
-                       }
-
-                       if(!dup) {
-                               efree(class_name);
-                       }
-
-                       value_ptr->value.obj = Z_OBJ_HANDLER_PP(value, 
clone_obj)(*value TSRMLS_CC);
-                       zval_ptr_dtor(value);
-                       *value = value_ptr;
-               }
                *(argument_array++) = value;
                arg_count--;
        }
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_execute.c?r1=1.716.2.12.2.24.2.23&r2=1.716.2.12.2.24.2.24&diff_format=u
Index: ZendEngine2/zend_execute.c
diff -u ZendEngine2/zend_execute.c:1.716.2.12.2.24.2.23 
ZendEngine2/zend_execute.c:1.716.2.12.2.24.2.24
--- ZendEngine2/zend_execute.c:1.716.2.12.2.24.2.23     Sat Mar  8 11:47:13 2008
+++ ZendEngine2/zend_execute.c  Tue Mar 18 14:10:43 2008
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: zend_execute.c,v 1.716.2.12.2.24.2.23 2008/03/08 11:47:13 felipe Exp $ 
*/
+/* $Id: zend_execute.c,v 1.716.2.12.2.24.2.24 2008/03/18 14:10:43 felipe Exp $ 
*/
 
 #define ZEND_INTENSIVE_DEBUGGING 0
 
@@ -560,26 +560,7 @@
        object = *object_ptr;
 
        /* separate our value if necessary */
-       if (EG(ze1_compatibility_mode) && Z_TYPE_P(value) == IS_OBJECT) {
-               zval *orig_value = value;
-               char *class_name;
-               zend_uint class_name_len;
-               int dup;
-               
-               ALLOC_ZVAL(value);
-               *value = *orig_value;
-               Z_UNSET_ISREF_P(value);
-               Z_SET_REFCOUNT_P(value, 0);
-               dup = zend_get_object_classname(orig_value, &class_name, 
&class_name_len TSRMLS_CC);
-               if (Z_OBJ_HANDLER_P(value, clone_obj) == NULL) {
-                       zend_error_noreturn(E_ERROR, "Trying to clone an 
uncloneable object of class %s",  class_name);
-               }
-               zend_error(E_STRICT, "Implicit cloning object of class '%s' 
because of 'zend.ze1_compatibility_mode'", class_name);             
-               value->value.obj = Z_OBJ_HANDLER_P(orig_value, 
clone_obj)(orig_value TSRMLS_CC);
-               if(!dup)        {
-                       efree(class_name);
-               }
-       } else if (value_op->op_type == IS_TMP_VAR) {
+       if (value_op->op_type == IS_TMP_VAR) {
                zval *orig_value = value;
 
                ALLOC_ZVAL(value);
@@ -686,49 +667,7 @@
                return variable_ptr;
        }
 
-       if (EG(ze1_compatibility_mode) && Z_TYPE_P(value) == IS_OBJECT) {
-               char *class_name;
-               zend_uint class_name_len;
-               int dup;
-                       
-               dup = zend_get_object_classname(value, &class_name, 
&class_name_len TSRMLS_CC);
-  
-               if (Z_OBJ_HANDLER_P(value, clone_obj) == NULL) {
-                       zend_error_noreturn(E_ERROR, "Trying to clone an 
uncloneable object of class %s",  class_name);
-               } else if (PZVAL_IS_REF(variable_ptr)) {
-                       if (variable_ptr != value) {
-                               zend_uint refcount = Z_REFCOUNT_P(variable_ptr);
- 
-                               garbage = *variable_ptr;
-                               *variable_ptr = *value;
-                               Z_SET_REFCOUNT_P(variable_ptr, refcount);
-                               Z_SET_ISREF_P(variable_ptr);
-                               zend_error(E_STRICT, "Implicit cloning object 
of class '%s' because of 'zend.ze1_compatibility_mode'", class_name);
-                               variable_ptr->value.obj = 
Z_OBJ_HANDLER_P(value, clone_obj)(value TSRMLS_CC);
-                               zendi_zval_dtor(garbage);
-                               return variable_ptr;
-                       }
-               } else {
-                       if (variable_ptr != value) {
-                               Z_ADDREF_P(value);
-                               Z_DELREF_P(variable_ptr);
-                               if (Z_REFCOUNT_P(variable_ptr) == 0) {
-                                       zendi_zval_dtor(*variable_ptr);
-                               } else {
-                                       ALLOC_ZVAL(variable_ptr);
-                                       *variable_ptr_ptr = variable_ptr;
-                               }
-                               *variable_ptr = *value;
-                               INIT_PZVAL(variable_ptr);
-                               zend_error(E_STRICT, "Implicit cloning object 
of class '%s' because of 'zend.ze1_compatibility_mode'", class_name);
-                               variable_ptr->value.obj = 
Z_OBJ_HANDLER_P(value, clone_obj)(value TSRMLS_CC);
-                               zval_ptr_dtor(&value);
-                       }
-               }
-               if (!dup) {
-                       efree(class_name);
-               }
-       } else if (PZVAL_IS_REF(variable_ptr)) {
+       if (PZVAL_IS_REF(variable_ptr)) {
                if (variable_ptr!=value) {
                        zend_uint refcount = Z_REFCOUNT_P(variable_ptr);
 
@@ -798,32 +737,9 @@
 {
        zval *variable_ptr = *variable_ptr_ptr;
 
-       if (EG(ze1_compatibility_mode) && Z_TYPE_P(value) == IS_OBJECT) {
-               char *class_name;
-               zend_uint class_name_len;
-               int dup;
- 
-               dup = zend_get_object_classname(value, &class_name, 
&class_name_len TSRMLS_CC);
-               
-               if (Z_OBJ_HANDLER_P(value, clone_obj) == NULL) {
-                       zend_error_noreturn(E_ERROR, "Trying to clone an 
uncloneable object of class %s",  class_name);
-               } else {
-                       Z_DELREF_P(variable_ptr);
-                       ALLOC_ZVAL(variable_ptr);
-                       *variable_ptr_ptr = variable_ptr;
-                       *variable_ptr = *value;
-                       INIT_PZVAL(variable_ptr);
-                       zend_error(E_STRICT, "Implicit cloning object of class 
'%s' because of 'zend.ze1_compatibility_mode'", class_name);
-                       variable_ptr->value.obj = Z_OBJ_HANDLER_P(value, 
clone_obj)(value TSRMLS_CC);
-               }
-               if (!dup) {
-                       efree(class_name);
-               }
-       } else {
-               Z_DELREF_P(variable_ptr);
-               *variable_ptr_ptr = value;
-               Z_ADDREF_P(value);
-       }
+       Z_DELREF_P(variable_ptr);
+       *variable_ptr_ptr = value;
+       Z_ADDREF_P(value);
 }
 
 /* Utility Functions for Extensions */
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_execute.h?r1=1.84.2.4.2.8.2.6&r2=1.84.2.4.2.8.2.7&diff_format=u
Index: ZendEngine2/zend_execute.h
diff -u ZendEngine2/zend_execute.h:1.84.2.4.2.8.2.6 
ZendEngine2/zend_execute.h:1.84.2.4.2.8.2.7
--- ZendEngine2/zend_execute.h:1.84.2.4.2.8.2.6 Wed Mar 12 08:52:49 2008
+++ ZendEngine2/zend_execute.h  Tue Mar 18 14:10:43 2008
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: zend_execute.h,v 1.84.2.4.2.8.2.6 2008/03/12 08:52:49 dmitry Exp $ */
+/* $Id: zend_execute.h,v 1.84.2.4.2.8.2.7 2008/03/18 14:10:43 felipe Exp $ */
 
 #ifndef ZEND_EXECUTE_H
 #define ZEND_EXECUTE_H
@@ -122,15 +122,8 @@
                                                break;
                                        }
                                }
-                       
-                               if(EG(ze1_compatibility_mode)) {
-                                       result = 
(zend_hash_num_elements(Z_OBJPROP_P(op))?1:0);
-                               } else {
-                                       result = 1;
-                               }
-                       } else {
-                               result = 1;
                        }
+                       result = 1;
                        break;
                default:
                        result = 0;
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_execute_API.c?r1=1.331.2.20.2.24.2.29&r2=1.331.2.20.2.24.2.30&diff_format=u
Index: ZendEngine2/zend_execute_API.c
diff -u ZendEngine2/zend_execute_API.c:1.331.2.20.2.24.2.29 
ZendEngine2/zend_execute_API.c:1.331.2.20.2.24.2.30
--- ZendEngine2/zend_execute_API.c:1.331.2.20.2.24.2.29 Tue Mar 18 08:36:28 2008
+++ ZendEngine2/zend_execute_API.c      Tue Mar 18 14:10:43 2008
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: zend_execute_API.c,v 1.331.2.20.2.24.2.29 2008/03/18 08:36:28 dmitry 
Exp $ */
+/* $Id: zend_execute_API.c,v 1.331.2.20.2.24.2.30 2008/03/18 14:10:43 felipe 
Exp $ */
 
 #include <stdio.h>
 #include <signal.h>
@@ -425,11 +425,6 @@
                TSRMLS_FETCH();
 
                if (Z_REFCOUNT_PP(zval_ptr) == 1) {
-                       if ((*zval_ptr)->type == IS_OBJECT) {
-                               if (EG(ze1_compatibility_mode)) {
-                                       return;
-                               }
-                       }
                        Z_UNSET_ISREF_PP(zval_ptr);
                }
 
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_globals.h?r1=1.141.2.3.2.7.2.10&r2=1.141.2.3.2.7.2.11&diff_format=u
Index: ZendEngine2/zend_globals.h
diff -u ZendEngine2/zend_globals.h:1.141.2.3.2.7.2.10 
ZendEngine2/zend_globals.h:1.141.2.3.2.7.2.11
--- ZendEngine2/zend_globals.h:1.141.2.3.2.7.2.10       Tue Mar 18 08:36:28 2008
+++ ZendEngine2/zend_globals.h  Tue Mar 18 14:10:43 2008
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: zend_globals.h,v 1.141.2.3.2.7.2.10 2008/03/18 08:36:28 dmitry Exp $ */
+/* $Id: zend_globals.h,v 1.141.2.3.2.7.2.11 2008/03/18 14:10:43 felipe Exp $ */
 
 #ifndef ZEND_GLOBALS_H
 #define ZEND_GLOBALS_H
@@ -186,7 +186,6 @@
        HashTable *in_autoload;
        zend_function *autoload_func;
        zend_bool full_tables_cleanup;
-       zend_bool ze1_compatibility_mode;
 
        /* for extended information support */
        zend_bool no_extensions;
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_objects.c?r1=1.56.2.3.2.6.2.2&r2=1.56.2.3.2.6.2.3&diff_format=u
Index: ZendEngine2/zend_objects.c
diff -u ZendEngine2/zend_objects.c:1.56.2.3.2.6.2.2 
ZendEngine2/zend_objects.c:1.56.2.3.2.6.2.3
--- ZendEngine2/zend_objects.c:1.56.2.3.2.6.2.2 Mon Dec 31 07:17:04 2007
+++ ZendEngine2/zend_objects.c  Tue Mar 18 14:10:43 2008
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: zend_objects.c,v 1.56.2.3.2.6.2.2 2007/12/31 07:17:04 sebastian Exp $ 
*/
+/* $Id: zend_objects.c,v 1.56.2.3.2.6.2.3 2008/03/18 14:10:43 felipe Exp $ */
 
 #include "zend.h"
 #include "zend_globals.h"
@@ -140,33 +140,10 @@
        return (zend_object *)zend_object_store_get_object(zobject TSRMLS_CC);
 }
 
-static void zval_add_ref_or_clone(zval **p)
-{
-       if (Z_TYPE_PP(p) == IS_OBJECT && !PZVAL_IS_REF(*p)) {
-               TSRMLS_FETCH();
-
-               if (Z_OBJ_HANDLER_PP(p, clone_obj) == NULL) {
-                       zend_error(E_ERROR, "Trying to clone an uncloneable 
object of class %s",  Z_OBJCE_PP(p)->name);
-               } else {
-                       zval *orig = *p;
-
-                       ALLOC_ZVAL(*p);
-                       **p = *orig;
-                       INIT_PZVAL(*p);
-                       (*p)->value.obj = Z_OBJ_HT_PP(p)->clone_obj(orig 
TSRMLS_CC);
-               }
-       } else {
-               Z_ADDREF_PP(p);
-       }
-}
-
 ZEND_API void zend_objects_clone_members(zend_object *new_object, 
zend_object_value new_obj_val, zend_object *old_object, zend_object_handle 
handle TSRMLS_DC)
 {
-       if (EG(ze1_compatibility_mode)) {
-               zend_hash_copy(new_object->properties, old_object->properties, 
(copy_ctor_func_t) zval_add_ref_or_clone, (void *) NULL /* Not used anymore */, 
sizeof(zval *));
-       } else {
-               zend_hash_copy(new_object->properties, old_object->properties, 
(copy_ctor_func_t) zval_add_ref, (void *) NULL /* Not used anymore */, 
sizeof(zval *));
-       }
+       zend_hash_copy(new_object->properties, old_object->properties, 
(copy_ctor_func_t) zval_add_ref, (void *) NULL /* Not used anymore */, 
sizeof(zval *));
+
        if (old_object->ce->clone) {
                zval *new_obj;
 
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_operators.c?r1=1.208.2.4.2.23.2.8&r2=1.208.2.4.2.23.2.9&diff_format=u
Index: ZendEngine2/zend_operators.c
diff -u ZendEngine2/zend_operators.c:1.208.2.4.2.23.2.8 
ZendEngine2/zend_operators.c:1.208.2.4.2.23.2.9
--- ZendEngine2/zend_operators.c:1.208.2.4.2.23.2.8     Tue Jan 22 09:27:47 2008
+++ ZendEngine2/zend_operators.c        Tue Mar 18 14:10:43 2008
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: zend_operators.c,v 1.208.2.4.2.23.2.8 2008/01/22 09:27:47 dmitry Exp $ 
*/
+/* $Id: zend_operators.c,v 1.208.2.4.2.23.2.9 2008/03/18 14:10:43 felipe Exp $ 
*/
 
 #include <ctype.h>
 
@@ -367,15 +367,8 @@
                                if (Z_TYPE_P(op) == IS_LONG) {
                                        return;
                                }
-
-                               if (EG(ze1_compatibility_mode)) {
-                                       HashTable *ht = Z_OBJPROP_P(op);
-                                       if (ht) {
-                                               retval = 
(zend_hash_num_elements(ht)?1:0);
-                                       }
-                               } else {
-                                       zend_error(E_NOTICE, "Object of class 
%s could not be converted to int", Z_OBJCE_P(op)->name);
-                               }
+                               zend_error(E_NOTICE, "Object of class %s could 
not be converted to int", Z_OBJCE_P(op)->name);
+                               
                                zval_dtor(op);
                                ZVAL_LONG(op, retval);
                                return;
@@ -433,15 +426,7 @@
                                if (Z_TYPE_P(op) == IS_DOUBLE) {
                                        return;
                                }
-
-                               if (EG(ze1_compatibility_mode)) {
-                                       HashTable *ht = Z_OBJPROP_P(op);
-                                       if (ht) {
-                                               retval = 
(zend_hash_num_elements(ht)?1.0:0.0);
-                                       }
-                               } else {
-                                       zend_error(E_NOTICE, "Object of class 
%s could not be converted to double", Z_OBJCE_P(op)->name);
-                               }
+                               zend_error(E_NOTICE, "Object of class %s could 
not be converted to double", Z_OBJCE_P(op)->name);
 
                                zval_dtor(op);
                                ZVAL_DOUBLE(op, retval);
@@ -530,13 +515,6 @@
                                        return;
                                }
 
-                               if (EG(ze1_compatibility_mode)) {
-                                       HashTable *ht = Z_OBJPROP_P(op);
-                                       if (ht) {
-                                               retval = 
(zend_hash_num_elements(ht)?1:0);
-                                       }
-                               }
-
                                zval_dtor(op);
                                ZVAL_BOOL(op, retval);
                                break;
@@ -1565,15 +1543,7 @@
                        break;
                case IS_OBJECT:
                        if (Z_OBJ_HT_P(op1) == Z_OBJ_HT_P(op2)) {
-                               if (EG(ze1_compatibility_mode)) {
-                                       zend_compare_objects(result, op1, op2 
TSRMLS_CC);
-                                       /* comparison returns 0 in case of 
equality and
-                                        * 1 in case of ineqaulity, we need to 
reverse it
-                                        */
-                                       Z_LVAL_P(result) = !Z_LVAL_P(result);
-                               } else {
-                                       Z_LVAL_P(result) = (Z_OBJ_HANDLE_P(op1) 
== Z_OBJ_HANDLE_P(op2));
-                               }
+                               Z_LVAL_P(result) = (Z_OBJ_HANDLE_P(op1) == 
Z_OBJ_HANDLE_P(op2));
                        } else {
                                Z_LVAL_P(result) = 0;
                        }
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_vm_def.h?r1=1.59.2.29.2.48.2.44&r2=1.59.2.29.2.48.2.45&diff_format=u
Index: ZendEngine2/zend_vm_def.h
diff -u ZendEngine2/zend_vm_def.h:1.59.2.29.2.48.2.44 
ZendEngine2/zend_vm_def.h:1.59.2.29.2.48.2.45
--- ZendEngine2/zend_vm_def.h:1.59.2.29.2.48.2.44       Tue Mar 18 08:36:28 2008
+++ ZendEngine2/zend_vm_def.h   Tue Mar 18 14:10:43 2008
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: zend_vm_def.h,v 1.59.2.29.2.48.2.44 2008/03/18 08:36:28 dmitry Exp $ */
+/* $Id: zend_vm_def.h,v 1.59.2.29.2.48.2.45 2008/03/18 14:10:43 felipe Exp $ */
 
 /* If you change this file, please regenerate the zend_vm_execute.h and
  * zend_vm_opcodes.h files by running:
@@ -2322,25 +2322,7 @@
 
                retval_ptr = GET_OP1_ZVAL_PTR(BP_VAR_R);
 
-               if (EG(ze1_compatibility_mode) && Z_TYPE_P(retval_ptr) == 
IS_OBJECT) {
-                       zval *ret;
-                       char *class_name;
-                       zend_uint class_name_len;
-                       int dup;
-
-                       ALLOC_ZVAL(ret);
-                       INIT_PZVAL_COPY(ret, retval_ptr);
-                       dup = zend_get_object_classname(retval_ptr, 
&class_name, &class_name_len TSRMLS_CC);
-                       if (Z_OBJ_HT_P(retval_ptr)->clone_obj == NULL) {
-                               zend_error_noreturn(E_ERROR, "Trying to clone 
an uncloneable object of class %s",  class_name);
-                       }
-                       zend_error(E_STRICT, "Implicit cloning object of class 
'%s' because of 'zend.ze1_compatibility_mode'", class_name);
-                       ret->value.obj = 
Z_OBJ_HT_P(retval_ptr)->clone_obj(retval_ptr TSRMLS_CC);
-                       *EG(return_value_ptr_ptr) = ret;
-                       if (!dup) {
-                               efree(class_name);
-                       }
-               } else if (!IS_OP1_TMP_FREE()) { /* Not a temp var */
+               if (!IS_OP1_TMP_FREE()) { /* Not a temp var */
                        if (EG(active_op_array)->return_reference == 
ZEND_RETURN_REF ||
                            (PZVAL_IS_REF(retval_ptr) && 
Z_REFCOUNT_P(retval_ptr) > 0)) {
                                zval *ret;
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_vm_execute.h?r1=1.62.2.30.2.49.2.43&r2=1.62.2.30.2.49.2.44&diff_format=u
Index: ZendEngine2/zend_vm_execute.h
diff -u ZendEngine2/zend_vm_execute.h:1.62.2.30.2.49.2.43 
ZendEngine2/zend_vm_execute.h:1.62.2.30.2.49.2.44
--- ZendEngine2/zend_vm_execute.h:1.62.2.30.2.49.2.43   Tue Mar 18 08:36:28 2008
+++ ZendEngine2/zend_vm_execute.h       Tue Mar 18 14:10:43 2008
@@ -1432,25 +1432,7 @@
 
                retval_ptr = &opline->op1.u.constant;
 
-               if (EG(ze1_compatibility_mode) && Z_TYPE_P(retval_ptr) == 
IS_OBJECT) {
-                       zval *ret;
-                       char *class_name;
-                       zend_uint class_name_len;
-                       int dup;
-
-                       ALLOC_ZVAL(ret);
-                       INIT_PZVAL_COPY(ret, retval_ptr);
-                       dup = zend_get_object_classname(retval_ptr, 
&class_name, &class_name_len TSRMLS_CC);
-                       if (Z_OBJ_HT_P(retval_ptr)->clone_obj == NULL) {
-                               zend_error_noreturn(E_ERROR, "Trying to clone 
an uncloneable object of class %s",  class_name);
-                       }
-                       zend_error(E_STRICT, "Implicit cloning object of class 
'%s' because of 'zend.ze1_compatibility_mode'", class_name);
-                       ret->value.obj = 
Z_OBJ_HT_P(retval_ptr)->clone_obj(retval_ptr TSRMLS_CC);
-                       *EG(return_value_ptr_ptr) = ret;
-                       if (!dup) {
-                               efree(class_name);
-                       }
-               } else if (!0) { /* Not a temp var */
+               if (!0) { /* Not a temp var */
                        if (EG(active_op_array)->return_reference == 
ZEND_RETURN_REF ||
                            (PZVAL_IS_REF(retval_ptr) && 
Z_REFCOUNT_P(retval_ptr) > 0)) {
                                zval *ret;
@@ -4608,25 +4590,7 @@
 
                retval_ptr = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 
TSRMLS_CC);
 
-               if (EG(ze1_compatibility_mode) && Z_TYPE_P(retval_ptr) == 
IS_OBJECT) {
-                       zval *ret;
-                       char *class_name;
-                       zend_uint class_name_len;
-                       int dup;
-
-                       ALLOC_ZVAL(ret);
-                       INIT_PZVAL_COPY(ret, retval_ptr);
-                       dup = zend_get_object_classname(retval_ptr, 
&class_name, &class_name_len TSRMLS_CC);
-                       if (Z_OBJ_HT_P(retval_ptr)->clone_obj == NULL) {
-                               zend_error_noreturn(E_ERROR, "Trying to clone 
an uncloneable object of class %s",  class_name);
-                       }
-                       zend_error(E_STRICT, "Implicit cloning object of class 
'%s' because of 'zend.ze1_compatibility_mode'", class_name);
-                       ret->value.obj = 
Z_OBJ_HT_P(retval_ptr)->clone_obj(retval_ptr TSRMLS_CC);
-                       *EG(return_value_ptr_ptr) = ret;
-                       if (!dup) {
-                               efree(class_name);
-                       }
-               } else if (!1) { /* Not a temp var */
+               if (!1) { /* Not a temp var */
                        if (EG(active_op_array)->return_reference == 
ZEND_RETURN_REF ||
                            (PZVAL_IS_REF(retval_ptr) && 
Z_REFCOUNT_P(retval_ptr) > 0)) {
                                zval *ret;
@@ -7719,25 +7683,7 @@
 
                retval_ptr = _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 
TSRMLS_CC);
 
-               if (EG(ze1_compatibility_mode) && Z_TYPE_P(retval_ptr) == 
IS_OBJECT) {
-                       zval *ret;
-                       char *class_name;
-                       zend_uint class_name_len;
-                       int dup;
-
-                       ALLOC_ZVAL(ret);
-                       INIT_PZVAL_COPY(ret, retval_ptr);
-                       dup = zend_get_object_classname(retval_ptr, 
&class_name, &class_name_len TSRMLS_CC);
-                       if (Z_OBJ_HT_P(retval_ptr)->clone_obj == NULL) {
-                               zend_error_noreturn(E_ERROR, "Trying to clone 
an uncloneable object of class %s",  class_name);
-                       }
-                       zend_error(E_STRICT, "Implicit cloning object of class 
'%s' because of 'zend.ze1_compatibility_mode'", class_name);
-                       ret->value.obj = 
Z_OBJ_HT_P(retval_ptr)->clone_obj(retval_ptr TSRMLS_CC);
-                       *EG(return_value_ptr_ptr) = ret;
-                       if (!dup) {
-                               efree(class_name);
-                       }
-               } else if (!0) { /* Not a temp var */
+               if (!0) { /* Not a temp var */
                        if (EG(active_op_array)->return_reference == 
ZEND_RETURN_REF ||
                            (PZVAL_IS_REF(retval_ptr) && 
Z_REFCOUNT_P(retval_ptr) > 0)) {
                                zval *ret;
@@ -21409,25 +21355,7 @@
 
                retval_ptr = _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R 
TSRMLS_CC);
 
-               if (EG(ze1_compatibility_mode) && Z_TYPE_P(retval_ptr) == 
IS_OBJECT) {
-                       zval *ret;
-                       char *class_name;
-                       zend_uint class_name_len;
-                       int dup;
-
-                       ALLOC_ZVAL(ret);
-                       INIT_PZVAL_COPY(ret, retval_ptr);
-                       dup = zend_get_object_classname(retval_ptr, 
&class_name, &class_name_len TSRMLS_CC);
-                       if (Z_OBJ_HT_P(retval_ptr)->clone_obj == NULL) {
-                               zend_error_noreturn(E_ERROR, "Trying to clone 
an uncloneable object of class %s",  class_name);
-                       }
-                       zend_error(E_STRICT, "Implicit cloning object of class 
'%s' because of 'zend.ze1_compatibility_mode'", class_name);
-                       ret->value.obj = 
Z_OBJ_HT_P(retval_ptr)->clone_obj(retval_ptr TSRMLS_CC);
-                       *EG(return_value_ptr_ptr) = ret;
-                       if (!dup) {
-                               efree(class_name);
-                       }
-               } else if (!0) { /* Not a temp var */
+               if (!0) { /* Not a temp var */
                        if (EG(active_op_array)->return_reference == 
ZEND_RETURN_REF ||
                            (PZVAL_IS_REF(retval_ptr) && 
Z_REFCOUNT_P(retval_ptr) > 0)) {
                                zval *ret;
http://cvs.php.net/viewvc.cgi/php-src/ext/dom/php_dom.c?r1=1.73.2.12.2.12.2.4&r2=1.73.2.12.2.12.2.5&diff_format=u
Index: php-src/ext/dom/php_dom.c
diff -u php-src/ext/dom/php_dom.c:1.73.2.12.2.12.2.4 
php-src/ext/dom/php_dom.c:1.73.2.12.2.12.2.5
--- php-src/ext/dom/php_dom.c:1.73.2.12.2.12.2.4        Fri Jan 25 16:13:04 2008
+++ php-src/ext/dom/php_dom.c   Tue Mar 18 14:10:45 2008
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: php_dom.c,v 1.73.2.12.2.12.2.4 2008/01/25 16:13:04 rrichards Exp $ */
+/* $Id: php_dom.c,v 1.73.2.12.2.12.2.5 2008/03/18 14:10:45 felipe Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -69,7 +69,6 @@
 zend_class_entry *dom_namespace_node_class_entry;
 
 zend_object_handlers dom_object_handlers;
-zend_object_handlers dom_ze1_object_handlers;
 
 static HashTable classes;
 
@@ -504,25 +503,13 @@
        return retval;
 }
 
-
-zend_object_value dom_objects_ze1_clone_obj(zval *zobject TSRMLS_DC)
-{
-       php_error(E_ERROR, "Cannot clone object of class %s due to 
'zend.ze1_compatibility_mode'", Z_OBJCE_P(zobject)->name);
-       /* Return zobject->value.obj just to satisfy compiler */
-       return zobject->value.obj;
-}
-
 static const zend_function_entry dom_functions[] = {
        PHP_FE(dom_import_simplexml, NULL)
        {NULL, NULL, NULL}
 };
 
 static zend_object_handlers* dom_get_obj_handlers(TSRMLS_D) {
-       if (EG(ze1_compatibility_mode)) {
-               return &dom_ze1_object_handlers;
-       } else {
-               return &dom_object_handlers;
-       }
+       return &dom_object_handlers;
 }
 
 static const zend_module_dep dom_deps[] = {
@@ -561,13 +548,6 @@
        dom_object_handlers.clone_obj = dom_objects_store_clone_obj;
        dom_object_handlers.has_property = dom_property_exists;
 
-       memcpy(&dom_ze1_object_handlers, zend_get_std_object_handlers(), 
sizeof(zend_object_handlers));
-       dom_ze1_object_handlers.read_property = dom_read_property;
-       dom_ze1_object_handlers.write_property = dom_write_property;
-       dom_ze1_object_handlers.get_property_ptr_ptr = dom_get_property_ptr_ptr;
-       dom_ze1_object_handlers.clone_obj = dom_objects_ze1_clone_obj;
-       dom_ze1_object_handlers.has_property = dom_property_exists;
-
        zend_hash_init(&classes, 0, NULL, NULL, 1);
 
        INIT_CLASS_ENTRY(ce, "DOMException", 
php_dom_domexception_class_functions);
http://cvs.php.net/viewvc.cgi/php-src/ext/simplexml/simplexml.c?r1=1.151.2.22.2.35.2.10&r2=1.151.2.22.2.35.2.11&diff_format=u
Index: php-src/ext/simplexml/simplexml.c
diff -u php-src/ext/simplexml/simplexml.c:1.151.2.22.2.35.2.10 
php-src/ext/simplexml/simplexml.c:1.151.2.22.2.35.2.11
--- php-src/ext/simplexml/simplexml.c:1.151.2.22.2.35.2.10      Thu Jan 31 
21:58:57 2008
+++ php-src/ext/simplexml/simplexml.c   Tue Mar 18 14:10:45 2008
@@ -18,7 +18,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: simplexml.c,v 1.151.2.22.2.35.2.10 2008/01/31 21:58:57 rrichards Exp $ 
*/
+/* $Id: simplexml.c,v 1.151.2.22.2.35.2.11 2008/03/18 14:10:45 felipe Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -1872,41 +1872,6 @@
 };
 /* }}} */
 
-static zend_object_handlers sxe_ze1_object_handlers = { /* {{{ */
-       ZEND_OBJECTS_STORE_HANDLERS,
-       sxe_property_read,
-       sxe_property_write,
-       sxe_dimension_read,
-       sxe_dimension_write,
-       sxe_property_get_adr,
-       sxe_get_value,                  /* get */
-       NULL,
-       sxe_property_exists,
-       sxe_property_delete,
-       sxe_dimension_exists,
-       sxe_dimension_delete,
-       sxe_get_properties,
-       NULL, /* zend_get_std_object_handlers()->get_method,*/
-       NULL, /* zend_get_std_object_handlers()->call_method,*/
-       NULL, /* zend_get_std_object_handlers()->get_constructor, */
-       NULL, /* zend_get_std_object_handlers()->get_class_entry,*/
-       NULL, /* zend_get_std_object_handlers()->get_class_name,*/
-       sxe_objects_compare,
-       sxe_object_cast,
-       sxe_count_elements,
-       sxe_get_debug_info
-};
-/* }}} */
-
-static zend_object_value sxe_object_ze1_clone(zval *zobject TSRMLS_DC) /* {{{ 
*/
-{
-       php_error(E_ERROR, "Cannot clone object of class %s due to 
'zend.ze1_compatibility_mode'", Z_OBJCE_P(zobject)->name);
-       /* Return zobject->value.obj just to satisfy compiler */
-       /* FIXME: Should not be a fatal */
-       return zobject->value.obj;
-}
-/* }}} */
-
 /* {{{ sxe_object_clone()
  */
 static void
@@ -2044,11 +2009,7 @@
        zend_object_value rv;
 
        rv.handle = zend_objects_store_put(intern, sxe_object_dtor, 
(zend_objects_free_object_storage_t)sxe_object_free_storage, sxe_object_clone 
TSRMLS_CC);
-       if (EG(ze1_compatibility_mode)) {
-               rv.handlers = (zend_object_handlers *) &sxe_ze1_object_handlers;
-       } else {
-               rv.handlers = (zend_object_handlers *) &sxe_object_handlers;
-       }
+       rv.handlers = (zend_object_handlers *) &sxe_object_handlers;
 
        return rv;
 }
@@ -2479,12 +2440,6 @@
        sxe_object_handlers.get_class_entry = 
zend_get_std_object_handlers()->get_class_entry;
        sxe_object_handlers.get_class_name = 
zend_get_std_object_handlers()->get_class_name;
 
-       sxe_ze1_object_handlers.get_method = 
zend_get_std_object_handlers()->get_method;
-       sxe_ze1_object_handlers.get_constructor = 
zend_get_std_object_handlers()->get_constructor;
-       sxe_ze1_object_handlers.get_class_entry = 
zend_get_std_object_handlers()->get_class_entry;
-       sxe_ze1_object_handlers.get_class_name = 
zend_get_std_object_handlers()->get_class_name;
-       sxe_ze1_object_handlers.clone_obj = sxe_object_ze1_clone;
-
 #ifdef HAVE_SPL
        if (zend_get_module_started("spl") == SUCCESS) {
                PHP_MINIT(spl_sxe)(INIT_FUNC_ARGS_PASSTHRU);
@@ -2512,7 +2467,7 @@
 {
        php_info_print_table_start();
        php_info_print_table_header(2, "Simplexml support", "enabled");
-       php_info_print_table_row(2, "Revision", "$Revision: 
1.151.2.22.2.35.2.10 $");
+       php_info_print_table_row(2, "Revision", "$Revision: 
1.151.2.22.2.35.2.11 $");
        php_info_print_table_row(2, "Schema support",
 #ifdef LIBXML_SCHEMAS_ENABLED
                "enabled");
http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.640.2.23.2.57.2.15&r2=1.640.2.23.2.57.2.16&diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.640.2.23.2.57.2.15 
php-src/main/main.c:1.640.2.23.2.57.2.16
--- php-src/main/main.c:1.640.2.23.2.57.2.15    Sun Mar 16 21:55:46 2008
+++ php-src/main/main.c Tue Mar 18 14:10:45 2008
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: main.c,v 1.640.2.23.2.57.2.15 2008/03/16 21:55:46 felipe Exp $ */
+/* $Id: main.c,v 1.640.2.23.2.57.2.16 2008/03/18 14:10:45 felipe Exp $ */
 
 /* {{{ includes
  */
@@ -1816,6 +1816,22 @@
                return FAILURE;
        }
 
+       /* Check for deprecated directives */
+       {
+               static const char *directives[] = {
+                       "zend.ze1_compatibility_mode",
+                       NULL};
+               const char **p = directives;
+               long val;
+
+               while (*p) {
+                       if (cfg_get_long((char*)*p, &val) == SUCCESS && val) {
+                               zend_error(E_WARNING, "Directive '%s' is no 
longer supported in PHP 5.3 and greater", *p);
+                       }
+                       ++p;
+               }
+       }
+
        /* Register PHP core ini entries */
        REGISTER_INI_ENTRIES();
 

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to