static void zend_std_unset_dimension(zval *object, zval *offset TSRMLS_DC)
{
zend_class_entry *ce = Z_OBJCE_P(object);
- zval *retval;
if (instanceof_function_ex(ce, zend_ce_arrayaccess, 1 TSRMLS_CC)) {
SEPARATE_ARG_IF_REF(offset);
- zend_call_method_with_1_params(&object, ce, NULL, "offsetunset", &retval, offset);
+ zend_call_method_with_1_params(&object, ce, NULL, "offsetunset", NULL, offset);
zval_ptr_dtor(&offset);
- zval_ptr_dtor(&retval);
} else {
zend_error(E_ERROR, "Cannot use object of type %s as array", ce->name);
}
}
public function offsetSet($index, $value) {
+ echo __METHOD__ . "($index, $value)\n";
$this->array[$index] = $value;
}
}
-$i = 0;
+$i = 0; $j = 0;
$foo = new FooBar();
-$foo[$i] = $i++;
-$foo[$i] = $i++;
-$foo[$i] = $i++;
+$foo[$j++] = $i++;
+$foo[$j++] = $i++;
+$foo[$j++] = $i++;
try
{
unset($foo[1]);
?>
===DONE===
--EXPECT--
+FooBar::offsetSet(0, 0)
+FooBar::offsetSet(1, 1)
+FooBar::offsetSet(2, 2)
CAUGHT: FAIL
FooBar Object
(
[array:private] => Array
(
- [1] => 0
- [2] => 1
- [3] => 2
+ [0] => 0
+ [1] => 1
+ [2] => 2
)
)