summaryrefslogtreecommitdiff
path: root/Zend/zend_operators.c
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/zend_operators.c')
-rw-r--r--Zend/zend_operators.c38
1 files changed, 4 insertions, 34 deletions
diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c
index 34736184c5..542af1576f 100644
--- a/Zend/zend_operators.c
+++ b/Zend/zend_operators.c
@@ -367,15 +367,8 @@ ZEND_API void convert_to_long_base(zval *op, int base)
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 @@ ZEND_API void convert_to_double(zval *op)
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 @@ ZEND_API void convert_to_boolean(zval *op)
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 @@ ZEND_API int is_identical_function(zval *result, zval *op1, zval *op2 TSRMLS_DC)
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;
}