File size: 503 Bytes
1e94262
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
--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