summaryrefslogtreecommitdiff
path: root/tests/lang/bug23922.phpt
blob: 1fc6e548ff0b41ef93286cca79526c567a6e9439 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--TEST--
Bug #23922 (scope doesn't properly propagate into internal functions)
--FILE--
<?php
  class foo
  {
    public $foo = 1;

    function as_string()
    { assert('$this->foo == 1'); }

    function as_expr()
    { assert($this->foo == 1); }
  }

  $foo = new foo();
  $foo->as_expr();
  $foo->as_string();
?>
--EXPECT--