From:             thomas dot hebinck at digionline dot de
Operating system: Linux
PHP version:      5CVS-2003-08-21 (dev)
PHP Bug Type:     Zend Engine 2 problem
Bug description:  $this->a doesn't call $this->__get('a')

Description:
------------
A call of $this->a creates a new public variable instead of calling
__get('a') - even if this call is just defined and never used. (same
problem in beta 1)

Reproduce code:
---------------
<?

class foo {
  function __get($property) {
    switch ($property) {
      case 'a':
        return 'a';
        break;
    }
  }
  function bar() {
        echo 'test';
        return $this->a; // this is the "bad" line
  }
}

$foo = new foo;

echo '$foo->a = "' . $foo->a . '"';
?>

Expected result:
----------------
$foo->a = "a"

Actual result:
--------------
$foo->a = ""

-- 
Edit bug report at http://bugs.php.net/?id=25199&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=25199&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=25199&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=25199&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=25199&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=25199&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=25199&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=25199&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=25199&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=25199&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=25199&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=25199&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25199&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=25199&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=25199&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=25199&r=gnused

Reply via email to