]> granicus.if.org Git - php/commitdiff
- Add new test
authorMarcus Boerger <helly@php.net>
Sun, 17 Jul 2005 20:57:51 +0000 (20:57 +0000)
committerMarcus Boerger <helly@php.net>
Sun, 17 Jul 2005 20:57:51 +0000 (20:57 +0000)
Zend/tests/bug33710.phpt [new file with mode: 0755]

diff --git a/Zend/tests/bug33710.phpt b/Zend/tests/bug33710.phpt
new file mode 100755 (executable)
index 0000000..15f19ea
--- /dev/null
@@ -0,0 +1,32 @@
+--TEST--
+Bug #33710 (ArrayAccess objects doen't initialize $this)
+--FILE--
+<?php
+
+class Foo implements ArrayAccess
+{
+       function offsetExists($offset) {/*...*/}
+       function offsetGet($offset) {/*...*/}
+       function offsetSet($offset, $value) {/*...*/}
+       function offsetUnset($offset) {/*...*/}
+       
+       function fail()
+       {
+               $this['blah'];
+       }
+       
+       function succeed()
+       {
+               $this;
+               $this['blah'];
+       }
+}
+
+$bar = new Foo();
+$bar->succeed();
+$bar->fail();
+
+?>
+===DONE===
+--EXPECT--
+===DONE===