mirror of
https://github.com/php/php-src.git
synced 2024-10-07 09:46:10 +00:00
24 lines
502 B
Plaintext
24 lines
502 B
Plaintext
|
--TEST--
|
||
|
Bug 30346 (arrayAcces & using $this)
|
||
|
--FILE--
|
||
|
<?php
|
||
|
|
||
|
class Test implements ArrayAccess
|
||
|
{
|
||
|
public function __construct() { }
|
||
|
public function offsetExists( $offset ) { return false; }
|
||
|
public function offsetGet( $offset ) { return $offset; }
|
||
|
public function offsetSet( $offset, $data ) { }
|
||
|
public function offsetUnset( $offset ) { }
|
||
|
}
|
||
|
|
||
|
$post = new Test;
|
||
|
$id = 'page';
|
||
|
echo $post[$id.'_show'];
|
||
|
echo "\n";
|
||
|
|
||
|
?>
|
||
|
===DONE===
|
||
|
--EXPECT--
|
||
|
page_show
|
||
|
===DONE===
|