#38317 [NEW]: "cannot reassign $this" outside object scope

From: Date: Thu, 03 Aug 2006 17:03:15 +0000
Subject: #38317 [NEW]: "cannot reassign $this" outside object scope
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-100294@lists.php.net to get a copy of this message
From: giunta dot gaetano at sea-aeroportimilano dot it Operating system: windows 2000 PHP version: 5.1.4 PHP Bug Type: Scripting Engine problem Bug description: "cannot reassign $this" outside object scope Description: ------------ It seems like php 5.1.4 does not like an assignment to variable '$this', regardless of the scope: - objet method - function - global Is this a real necessity or just a plain old bug??? Reproduce code: --------------- <?php function that($it){ $this = ''; } ?> or <?php $this = ''; ?> -- Edit bug report at http://bugs.php.net/?id=38317&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=38317&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=38317&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=38317&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=38317&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=38317&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=38317&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=38317&r=needscript Try newer version: http://bugs.php.net/fix.php?id=38317&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=38317&r=support Expected behavior: http://bugs.php.net/fix.php?id=38317&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=38317&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=38317&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=38317&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=38317&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=38317&r=dst IIS Stability: http://bugs.php.net/fix.php?id=38317&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=38317&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=38317&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=38317&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=38317&r=mysqlcfg

« previous php.bugs (#100294) next »