Re: [PHP-DEV] delete in PHP

2004-06-01 Thread Derick Rethans
On Tue, 1 Jun 2004, Ferdinand Beyer wrote: > On 1 Jun 2004 at 16:50, Florian Schaper wrote: > > > My version of delete works like the delete we know from C++. The > > object's destructor and the object is then released immediately. All > > references of this object are set to IS_NULL. > > > > Some

Re: [PHP-DEV] delete in PHP

2004-06-01 Thread Adam Bregenzer
On Tue, 2004-06-01 at 19:45, Florian Schaper wrote: > For completeness: > Proposed behaviour of delete as opposed to unset: > $ php-dev -r 'class Object { function __destruct() { echo > "Destroyed\n"; }} $o= new Object(); $o2= &$o; delete $o; var_export( $o ); > var_export( $o2 ); echo > "Shutti

Re: [PHP-DEV] Use of 'self' in static function in subclass

2004-06-01 Thread Jevon Wright
It's something I noticed, too. Consider this: class A { function a() { return $this::b(); } function b() { return 1; } } class B extends A { function b() { return 2; } } If I call $b = new B(); echo $b->a(); No matter what combination of this, self, parent, ... - I could never get B

Re: [PHP-DEV] Use of 'self' in static function in subclass

2004-06-01 Thread Adam Bregenzer
On Tue, 2004-06-01 at 19:53, Hans Lellelid wrote: > Yeah +1 on self:: binding at runtime. I can't really imagine a case > where you would want to refer to 'self' as the class that contains the > method *and not* the overridden method in invoked class (if it exists). > Binding this at runtime

Re: [PHP-DEV] Use of 'self' in static function in subclass

2004-06-01 Thread Hans Lellelid
Ferdinand Beyer wrote: On 1 Jun 2004 at 21:13, Timm Friebe wrote: Yes: self is bound at compiletime. It would need to be changed to evaluation at runtime und would be far more useful then. [...] I wouldn't mind chaning self in the first place, though. I prefer your solution to evaluate self at ru

Re: [PHP-DEV] delete in PHP

2004-06-01 Thread Florian Schaper
Timm Friebe wrote: [...] > In comparison to the proposed "delete", unset() only decreases the > refcount. > > Have a look at the following examples: > > $ php-dev -r 'class Object { function __destruct() { echo > "Destroyed\n"; }} $o= new Object(); unset($o); echo "Shutting > down\n";' > Destroyed

RE: [PHP-DEV] Overloaded property access

2004-06-01 Thread Rick Fletcher
After sending this mail I went and searched the bugs database more thoroughly and found this very problem here: http://bugs.php.net/bug.php?id=28444. My apologies. Rick > -Original Message- > From: Rick Fletcher [mailto:[EMAIL PROTECTED] > Sent: Tuesday, June 01, 2004 11:41a > To: [EMAI

Re: [PHP-DEV] delete in PHP

2004-06-01 Thread Timm Friebe
On Tue, 2004-06-01 at 16:50, Florian Schaper wrote: > Derick Rethans wrote: > > On Tue, 1 Jun 2004, Florian Schaper wrote: > > > >> An Zend API 2.0 paper I read a while ago said something about > >> "delete" being implemented in PHP5. > >> However, no delete. > >> > >> Was this feature dropped? I h

Re: [PHP-DEV] Use of 'self' in static function in subclass

2004-06-01 Thread Ferdinand Beyer
On 1 Jun 2004 at 21:13, Timm Friebe wrote: > Yes: self is bound at compiletime. It would need to be changed to > evaluation at runtime und would be far more useful then. > > [...] > > I wouldn't mind chaning self in the first place, though. I prefer your solution to evaluate self at runtime ins

Re: [PHP-DEV] Use of 'self' in static function in subclass

2004-06-01 Thread Timm Friebe
On Tue, 2004-06-01 at 15:11, Bert Slagter wrote: > Hi All, > > I have a class and a subclass, both with a static method: [...] > Somehow this behaviour seems logical, on the other hand I don't think > it's desired. I think that 'self' should point to the current class, > even if the static metho

[PHP-DEV] Overloaded property access

2004-06-01 Thread Rick Fletcher
I've just made use of overloaded property access for the first time and experienced some unexpected behavior. I just wanted to verify that it was the correct behavior with those who'd know best. two = new Two(); } public function __set( $n, $v ) { $GLOBALS

[PHP-DEV] Bug#27555 / Problem in Order of PHP Shutdown v. II

2004-06-01 Thread Florian Schaper
A friend of mine had the same Problem as stated in "bug"-Report 27555 and I "fixed" it before checking back with the bug-Database ... Why not to call the destructors before the modules are shut down? I wrote a short patch for this and it works out fine. That does not mean however that it does not

RE: [PHP-DEV] RC3

2004-06-01 Thread Wolfgang Drews
*This message was transferred with a trial version of CommuniGate(tm) Pro* > Can you get a June 1 snapshot from http://snaps.php.net/ and > let me know? > Thanks, np. but as i said before, i've got the latest already, BEFORE i startet this discussion :). Nevertheless i once more took the VERY lat

Re: [PHP-DEV] [patch] abuse-proof zif_mail()

2004-06-01 Thread Paul G
sara, - Original Message - From: "Sara Golemon" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, June 01, 2004 1:06 PM Subject: Re: [PHP-DEV] [patch] abuse-proof zif_mail() --- snip --- > The whole matter is moot because no matter how aggressively you block access > to mail(),

Re: [PHP-DEV] [patch] abuse-proof zif_mail()

2004-06-01 Thread Sara Golemon
> when it comes to mail(), it is a whole different story. if i disabled mail() > on just one box today, a *lot* of people would complain and with good > reason - the collateral inflicted by something that drastic (ie disabling a > very popular function to protect against a relative edge case) is wa

RE: [PHP-DEV] RC3

2004-06-01 Thread Andi Gutmans
Can you get a June 1 snapshot from http://snaps.php.net/ and let me know? Thanks, Andi At 07:07 PM 6/1/2004 +0200, Wolfgang Drews wrote: *This message was transferred with a trial version of CommuniGate(tm) Pro* Hi Andi, > I made some changes about 4 days ago. Can you try a build > from the past da

RE: [PHP-DEV] RC3

2004-06-01 Thread Wolfgang Drews
*This message was transferred with a trial version of CommuniGate(tm) Pro* Hi Andi, > I made some changes about 4 days ago. Can you try a build > from the past day > or two? sorry, i have no snapshot from this date. As i said before, my last snapshot is from 21.05.2004 and there the problem ex

RE: [PHP-DEV] RC3

2004-06-01 Thread Andi Gutmans
I made some changes about 4 days ago. Can you try a build from the past day or two? Andi At 06:59 PM 6/1/2004 +0200, Wolfgang Drews wrote: *This message was transferred with a trial version of CommuniGate(tm) Pro* Hi Andi, > In any case, the important thing right now is to try and > track down th

RE: [PHP-DEV] RC3

2004-06-01 Thread Wolfgang Drews
*This message was transferred with a trial version of CommuniGate(tm) Pro* Hi Andi, > In any case, the important thing right now is to try and > track down the > Windows problem which is not related. I'm not quite sure when it was > introduced. My latest fixes weren't supposed to touch that cod

Re: [PHP-DEV] Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend.c

2004-06-01 Thread Rasmus Lerdorf
I'd like to see this in PHP4 too. -Rasmus On Tue, 1 Jun 2004, Andrei Zmievski wrote: > Should we add this to PHP 4 as well? > > On Tue, 01 Jun 2004, Andi Gutmans wrote: > > andiTue Jun 1 07:45:46 2004 EDT > > > > Modified files: > > /ZendEngine2zend.c

Re: [PHP-DEV] RC3

2004-06-01 Thread Andi Gutmans
On Windows the ZEND_MM isn't being used (we use Windows specific memory pools), so it's really not relevant. With my tests ZEND_MM is faster than malloc() even on non-threaded servers. In any case, the important thing right now is to try and track down the Windows problem which is not related. I

[PHP-DEV] Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend.c

2004-06-01 Thread Andi Gutmans
I think it's OK to add. At 09:26 AM 6/1/2004 -0700, Andrei Zmievski wrote: Should we add this to PHP 4 as well? On Tue, 01 Jun 2004, Andi Gutmans wrote: > andi Tue Jun 1 07:45:46 2004 EDT > > Modified files: > /ZendEngine2 zend.c > Log: > - If user error handler returns "fa

Re: [PHP-DEV] delete in PHP

2004-06-01 Thread Ferdinand Beyer
On 1 Jun 2004 at 16:50, Florian Schaper wrote: > My version of delete works like the delete we know from C++. The object's > destructor and the object is then released immediately. All references of > this object are set to IS_NULL. > > Some might argue that this is a feature not worth having i

[PHP-DEV] Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend.c

2004-06-01 Thread Andrei Zmievski
Should we add this to PHP 4 as well? On Tue, 01 Jun 2004, Andi Gutmans wrote: > andi Tue Jun 1 07:45:46 2004 EDT > > Modified files: > /ZendEngine2 zend.c > Log: > - If user error handler returns "false" then we relay to the built in error > handler >

Re: [PHP-DEV] RC3

2004-06-01 Thread Sterling Hughes
Wolfgang Drews wrote: *This message was transferred with a trial version of CommuniGate(tm) Pro* Hi Andi, This is indeed very strange. I made some fixes to the memory manager a few days ago. Have you tried a version since then? before writing to this list, i've download the latest CVS-Snap Wi

Re: [PHP-DEV] delete in PHP

2004-06-01 Thread Florian Schaper
Derick Rethans wrote: > On Tue, 1 Jun 2004, Florian Schaper wrote: > >> An Zend API 2.0 paper I read a while ago said something about >> "delete" being implemented in PHP5. >> However, no delete. >> >> Was this feature dropped? I have implemented delete for myself now >> and was wondering if it was

[PHP-DEV] Bug #28597

2004-06-01 Thread Fernando Nemec
[EMAIL PROTECTED] wrote: > Please send the patch to [EMAIL PROTECTED] referring to this > bugreport (and a simple analysis describing why the current code is > wrong). Referring to bug http://bugs.php.net/bug.php?id=28597, I have made the attached patch. The piece of code modified translates a ch

Re: [PHP-DEV] delete in PHP

2004-06-01 Thread Derick Rethans
On Tue, 1 Jun 2004, Florian Schaper wrote: > An Zend API 2.0 paper I read a while ago said something about "delete" being > implemented in PHP5. > However, no delete. > > Was this feature dropped? I have implemented delete for myself now and was > wondering if it was worth committing. unset($obj)

[PHP-DEV] delete in PHP

2004-06-01 Thread Florian Schaper
An Zend API 2.0 paper I read a while ago said something about "delete" being implemented in PHP5. However, no delete. Was this feature dropped? I have implemented delete for myself now and was wondering if it was worth committing. ./regards Florian -- PHP Internals - PHP Runtime Development Ma

Re: [PHP-DEV] Use of 'self' in static function in subclass

2004-06-01 Thread Ferdinand Beyer
On 1 Jun 2004 at 16:19, Bert Slagter wrote: > This is a minimal testcase, in my real life situation there indeed is a > 'abstract static function Baz();' in Class Foo. But indeed, then a > "Fatal error: Cannot call abstract method Foo::Baz() in.." arises.. OK, this is indeed a problem then. -

Re: [PHP-DEV] Use of 'self' in static function in subclass

2004-06-01 Thread Bert Slagter
Ferdinand Beyer wrote: He should define an abstract method Foo::Baz() here. This is a minimal testcase, in my real life situation there indeed is a 'abstract static function Baz();' in Class Foo. But indeed, then a "Fatal error: Cannot call abstract method Foo::Baz() in.." arises.. Bert -- PHP I

Re: [PHP-DEV] Use of 'self' in static function in subclass

2004-06-01 Thread Hans Lellelid
Ferdinand Beyer wrote: On 1 Jun 2004 at 15:21, Stephan Schmidt wrote: Furthermore this renders the template-method pattern quite useless, so IMHO it should be changed. He should define an abstract method Foo::Baz() here. Yes, I agree that design-wise that would be better -- but it will still fa

RE: [PHP-DEV] RC3

2004-06-01 Thread Wolfgang Drews
*This message was transferred with a trial version of CommuniGate(tm) Pro* Hi Andi, > This is indeed very strange. I made some fixes to the memory > manager a few > days ago. Have you tried a version since then? before writing to this list, i've download the latest CVS-Snap Win-Built from snap

[PHP-DEV] Problem in Order of PHP Shutdown

2004-06-01 Thread Florian Schaper
There is a problem in the order the destructors of objects are destroyed at PHP shutdown. Let's say in an destructor the objects tries to save some states in a session variable that would currently fail since destructors are called after modules are freed. Sample & patch included. ./regards Flori

RE: [PHP-DEV] Use of 'self' in static function in subclass

2004-06-01 Thread Ferdinand Beyer
On 1 Jun 2004 at 15:21, Stephan Schmidt wrote: > Furthermore this renders the template-method pattern quite useless, so > IMHO it should be changed. He should define an abstract method Foo::Baz() here. -- Ferdinand Beyer <[EMAIL PROTECTED]> -- PHP Internals - PHP Runtime Development Mailing

RE: [PHP-DEV] RC3

2004-06-01 Thread Andi Gutmans
This is indeed very strange. I made some fixes to the memory manager a few days ago. Have you tried a version since then? Andi At 02:50 PM 6/1/2004 +0200, Wolfgang Drews wrote: *This message was transferred with a trial version of CommuniGate(tm) Pro* Hi Andi, > Anything else that needs to go int

[PHP-DEV] Re: Use of 'self' in static function in subclass

2004-06-01 Thread Hans Lellelid
Bert Slagter wrote: Hi All, I have a class and a subclass, both with a static method: class Foo2 extends Foo { static function Baz() { echo 'Baz'; } } Foo2::Bar(); ?> In this case I expect to find 'Baz' on my screen, but I get the following: "Fatal error: Call to undefined met

RE: [PHP-DEV] Use of 'self' in static function in subclass

2004-06-01 Thread Stephan Schmidt
Hi, > Somehow this behaviour seems logical, on the other hand I don't think > it's desired. I think that 'self' should point to the current class, > even if the static method resides in a parent class. > > Is this 'self'-behaviour intended? Furthermore this renders the template-method pattern

[PHP-DEV] Use of 'self' in static function in subclass

2004-06-01 Thread Bert Slagter
Hi All, I have a class and a subclass, both with a static method: class Foo2 extends Foo { static function Baz() { echo 'Baz'; } } Foo2::Bar(); ?> In this case I expect to find 'Baz' on my screen, but I get the following: "Fatal error: Call to undefined met

RE: [PHP-DEV] RC3

2004-06-01 Thread Wolfgang Drews
*This message was transferred with a trial version of CommuniGate(tm) Pro* Hi Andi, > Anything else that needs to go into RC3? maybe not so important for *nixer, but for Windows: I have a really annoying Memory Leak here on my Dev-Station with WinXP and the latest snaps-built (from tomorrow). Eve

[PHP-DEV] RC3

2004-06-01 Thread Andi Gutmans
Anything else that needs to go into RC3? Andi -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php