#35034 [Bgs]: $this != ($this)
ID: 35034 User updated by: olympic at dino-online dot de Reported By: olympic at dino-online dot de Status: Bogus Bug Type: Feature/Change Request Operating System: *nix PHP Version: 5.0.5 New Comment: Following your comment: $a=new Foo(); $b=$a ; // $b references $a $c=($a); //$c is now a copy because only variables are referencable ? (NOPE) Well, seems a little bitte inconsistent for me, why different behaviours in assignment and method calls ? Previous Comments: [2005-10-31 12:58:26] [EMAIL PROTECTED] Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php ($this) is an expression, not a variable, thus you can not pass it by reference. [2005-10-31 12:00:17] olympic at dino-online dot de Description: $this is treated as references, while ($this) not... $this != ($this) ?? omg :) Reproduce code: --- error_reporting(E_ALL); class Bar { function onlyByRefPlease(&$foo) { // ... } functionsomeMemberFunc1() { $this->onlyByRefPlease($this); } functionsomeMemberFunc2() { $this->onlyByRefPlease(($this)); // note: 2 Braces! } }; $foo = new Bar(); $foo->someMemberFunc1(); $foo->someMemberFunc2(); // throws error Expected result: /* none */ Actual result: -- Fatal error: Only variables can be passed by reference in /www/v3.evalanche.com/web/php_refbug.php on line 13 -- Edit this bug report at http://bugs.php.net/?id=35034&edit=1
#35034 [NEW]: $this != ($this)
From: olympic at dino-online dot de Operating system: *nix PHP version: 5.0.5 PHP Bug Type: Feature/Change Request Bug description: $this != ($this) Description: $this is treated as references, while ($this) not... $this != ($this) ?? omg :) Reproduce code: --- error_reporting(E_ALL); class Bar { function onlyByRefPlease(&$foo) { // ... } functionsomeMemberFunc1() { $this->onlyByRefPlease($this); } functionsomeMemberFunc2() { $this->onlyByRefPlease(($this)); // note: 2 Braces! } }; $foo = new Bar(); $foo->someMemberFunc1(); $foo->someMemberFunc2(); // throws error Expected result: /* none */ Actual result: -- Fatal error: Only variables can be passed by reference in /www/v3.evalanche.com/web/php_refbug.php on line 13 -- Edit bug report at http://bugs.php.net/?id=35034&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=35034&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=35034&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=35034&r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=35034&r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=35034&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=35034&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=35034&r=needscript Try newer version: http://bugs.php.net/fix.php?id=35034&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=35034&r=support Expected behavior: http://bugs.php.net/fix.php?id=35034&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=35034&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=35034&r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=35034&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35034&r=php3 Daylight Savings:http://bugs.php.net/fix.php?id=35034&r=dst IIS Stability: http://bugs.php.net/fix.php?id=35034&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=35034&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=35034&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=35034&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=35034&r=mysqlcfg
#34990 [WFx]: static calls and $this
ID: 34990 User updated by: olympic at dino-online dot de Reported By: olympic at dino-online dot de Status: Wont fix Bug Type: Feature/Change Request Operating System: all PHP Version: 5.0.5 New Comment: ok, my example is missing: error_reporting(E_ALL); You don't get a warning, and the suggested "fix" does of course not help - the method shouldn't be static in my example:) waiting for 6.0 . However: I don't think that my suggestion to do a typecheck does break existing code (except buggy one). Previous Comments: [2005-10-26 11:22:08] [EMAIL PROTECTED] This is done in order to keep backward compatibility with PHP4 and you can "fix" it easily declaring static methods as static (which is logically right). Methods declared as static do not have access to $this. Most likely this will be changed in PHP6, but we didn't discuss it yet. [2005-10-26 11:21:44] [EMAIL PROTECTED] We will not change this behavior in the PHP 4 and 5 versions as it will break scripts. It's on the list for PHP 6. ------------ [2005-10-26 11:11:40] olympic at dino-online dot de Description: In static calls $this is set. While in theory it might make sense to allow objects of the same class (or derived class) to "use" this feature, it's a potential pitfall and from my point of view it's bug. I think if a non static method is called statically then $this can't be any object that hasn't been created by this or a derive class. No other language has such a "feature" :) If it's not a bug, then read my bugreport as "remove this feature". If it's a bug, add a runtime checking for $this is object created by same or derived class. Reproduce code: --- Example: Noone can really say that this is "transparen" ok: class Foo { private$hallo="I am from Foo"; function dontCallMe() { return $this->hallo; } } class Bar { public $hallo="I am from Bar"; function testMe() { return Foo::dontCallMe(); } } $x=new Bar(); echo ($x->testMe()); // expected runtime error... Expected result: Runtime error. Actual result: -- output is: "I am from Bar" This return the member var of Bar, what you would NEVER expect. -- Edit this bug report at http://bugs.php.net/?id=34990&edit=1
#34990 [NEW]: static calls and $this
From: olympic at dino-online dot de Operating system: all PHP version: 5.0.5 PHP Bug Type: Feature/Change Request Bug description: static calls and $this Description: In static calls $this is set. While in theory it might make sense to allow objects of the same class (or derived class) to "use" this feature, it's a potential pitfall and from my point of view it's bug. I think if a non static method is called statically then $this can't be any object that hasn't been created by this or a derive class. No other language has such a "feature" :) If it's not a bug, then read my bugreport as "remove this feature". If it's a bug, add a runtime checking for $this is object created by same or derived class. Reproduce code: --- Example: Noone can really say that this is "transparen" ok: class Foo { private$hallo="I am from Foo"; function dontCallMe() { return $this->hallo; } } class Bar { public $hallo="I am from Bar"; function testMe() { return Foo::dontCallMe(); } } $x=new Bar(); echo ($x->testMe()); // expected runtime error... Expected result: Runtime error. Actual result: -- output is: "I am from Bar" This return the member var of Bar, what you would NEVER expect. -- Edit bug report at http://bugs.php.net/?id=34990&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=34990&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=34990&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=34990&r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=34990&r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=34990&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=34990&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=34990&r=needscript Try newer version: http://bugs.php.net/fix.php?id=34990&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=34990&r=support Expected behavior: http://bugs.php.net/fix.php?id=34990&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=34990&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=34990&r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=34990&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=34990&r=php3 Daylight Savings:http://bugs.php.net/fix.php?id=34990&r=dst IIS Stability: http://bugs.php.net/fix.php?id=34990&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=34990&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=34990&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=34990&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=34990&r=mysqlcfg
#20854 [Com]: Unable to load dynamic library
ID: 20854 Comment by: olympic at dino-online dot de Reported By: pardy at freemail dot hu Status: Bogus Bug Type: Oracle related Operating System: Windows 2000 Server PHP Version: 4.2.3 New Comment: Some people here seem to be very ignorant to this PHP-bug (!!). On a w2k server (With servicepacks and IE6.x installed) you cant run the php distribution because most extension dlls have a dependency to apphelp.dll. Easy to say "its a windows problem" (I know that the dependency comes from a windows dll SHLWAPI.DLL) - but you expect a software that is marked to run with w2k to work... I know that php isn't a comercial product but this does not mean that developers should stop investigating a bug report when they find a MS-dll that they didnt write... For "normal" users there is no workaround without help from php developers and changes to the distribution. Noone here is asking a "support question" its a bug or remove "runs on windows 2000 server" Previous Comments: [2004-02-12 05:03:03] giunta dot gaetano at sea-aeroportimilano dot it I had exactly the same headache with Oracle9 client. The funniest thing is Apache was running fine in exactly the same PC. It actually is a pbl related to IIS confioguration. The solution is: in IIS uncheck the "let IIS validate anon user password" in anoun user auth panel. Rationale: check out reports 216828 e 218756 on MSDN. [2002-12-07 02:35:34] pardy at freemail dot hu Ok, I have posted the problem description to [EMAIL PROTECTED] Please answer me there. By the way I still don't know why this isn't a bug in php. Maybe I don't understand what "php itself" means. Thanks. [2002-12-06 18:35:45] [EMAIL PROTECTED] This is not a support forum. [2002-12-06 06:55:40] pardy at freemail dot hu How can you be so sure that this is not a bug in php? I mean everything else seems ok. Then you must know where the problem is. What about telling me? Thanks [2002-12-06 06:25:33] [EMAIL PROTECTED] Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Thank you for your interest in PHP. The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/20854 -- Edit this bug report at http://bugs.php.net/?id=20854&edit=1