mirror of
https://github.com/php/php-src.git
synced 2026-04-04 06:32:49 +02:00
- Add new test
This commit is contained in:
32
Zend/tests/bug33710.phpt
Executable file
32
Zend/tests/bug33710.phpt
Executable file
@@ -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===
|
||||
Reference in New Issue
Block a user