bug30346.phpt 507 B

123456789101112131415161718192021222324
  1. --TEST--
  2. Bug #30346 (arrayAccess and using $this)
  3. --FILE--
  4. <?php
  5. class Test implements ArrayAccess
  6. {
  7. public function __construct() { }
  8. public function offsetExists( $offset ) { return false; }
  9. public function offsetGet( $offset ) { return $offset; }
  10. public function offsetSet( $offset, $data ) { }
  11. public function offsetUnset( $offset ) { }
  12. }
  13. $post = new Test;
  14. $id = 'page';
  15. echo $post[$id.'_show'];
  16. echo "\n";
  17. ?>
  18. ===DONE===
  19. --EXPECT--
  20. page_show
  21. ===DONE===