From:             tip at tut dot by
Operating system: 
PHP version:      4.3.9RC1
PHP Bug Type:     Feature/Change Request
Bug description:  Function to determine if a method is called statically

Description:
------------
Sometimes it is very convenient to use method from a class statically, but
while implementing such a function there's no way to determine how this
function is used.

executing this line from a static method call returns 1
print_r(isset($this));

while operations with is_object($this), gettype($this) etc. results in PHP
Notice:  Undefined variable:  this in c:\httpd\.php\pear\File\Find.php on
line 198



Reproduce code:
---------------
// executed from static method call
print_r(isset($this));

Expected result:
----------------
FALSE

Actual result:
--------------
1

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

Reply via email to