mirror of
https://github.com/php/php-src.git
synced 2024-11-24 10:24:11 +08:00
33 lines
472 B
PHP
Executable File
33 lines
472 B
PHP
Executable File
--TEST--
|
|
Bug #33710 (ArrayAccess objects doesn'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===
|