mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
75a678a7e3
Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
23 lines
503 B
PHP
23 lines
503 B
PHP
--TEST--
|
|
Bug #30346 (arrayAccess and using $this)
|
|
--FILE--
|
|
<?php
|
|
|
|
class Test implements ArrayAccess
|
|
{
|
|
public function __construct() { }
|
|
public function offsetExists( $offset ): bool { return false; }
|
|
public function offsetGet( $offset ): mixed { return $offset; }
|
|
public function offsetSet( $offset, $data ): void { }
|
|
public function offsetUnset( $offset ): void { }
|
|
}
|
|
|
|
$post = new Test;
|
|
$id = 'page';
|
|
echo $post[$id.'_show'];
|
|
echo "\n";
|
|
|
|
?>
|
|
--EXPECT--
|
|
page_show
|