php-src/Zend/tests/bug30346.phpt
2018-10-14 19:45:12 +02:00

25 lines
500 B
PHP

--TEST--
Bug #30346 (arrayAccess and 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===