From: igor at webta dot net
Operating system:
PHP version: 5.3CVS-2008-04-18 (snap)
PHP Bug Type: Scripting Engine problem
Bug description: Calling nonstatic methods in context of another objects
Description:
------------
Calling nonstatic methods in context of another objects
Reproduce code:
---------------
class A
{
public function bar ()
{
sort($this->arr);
}
}
class B
{
public $arr = array('a', 'c', 'b');
function run ()
{
A::bar();
var_dump($this->arr);
}
}
$b = new B();
$b->run();
Expected result:
----------------
Exception
Actual result:
--------------
Sorted array:
array
0 => string 'a' (length=1)
1 => string 'b' (length=1)
2 => string 'c' (length=1)
--
Edit bug report at http://bugs.php.net/?id=44771&edit=1
--
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=44771&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=44771&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=44771&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=44771&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=44771&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=44771&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=44771&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=44771&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=44771&r=support
Expected behavior: http://bugs.php.net/fix.php?id=44771&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=44771&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=44771&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=44771&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=44771&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=44771&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=44771&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=44771&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=44771&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=44771&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=44771&r=mysqlcfg