From: [EMAIL PROTECTED]
Operating system: Win2000
PHP version: 4.2.3
PHP Bug Type: Scripting Engine problem
Bug description: Static method call from non-statiic method fails.
when calling B::procSave from $a->procSave() the $this keeps linked to $a.
The code:
<?php
class A {
function A() {}
function procSave() {
echo "A";
if(isset($this)) echo "y"; else echo "n";
B::procSave();
}
}
class B {
function B() {}
function procSave() {
echo "B";
if(isset($this)) echo "y"; else echo "n";
}
}
$a = new A();
$b = new B();
$a->procSave();
B::procSave();
?>
--
Edit bug report at http://bugs.php.net/?id=19980&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=19980&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=19980&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=19980&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=19980&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=19980&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=19980&r=support
Expected behavior: http://bugs.php.net/fix.php?id=19980&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=19980&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=19980&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=19980&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=19980&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=19980&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=19980&r=isapi