Re: [PHP-DEV] New exceptions mechanism

2004-02-11 Thread Marcus Boerger
Hello Andi, it works now fine :-) marcus Tuesday, February 10, 2004, 11:24:55 AM, you wrote: > Does this still segfault for you? It doesn't for me. > Andi > At 11:29 PM 2/4/2004 +0100, Marcus Boerger wrote: >>Hello Andi, >> >>Tuesday, February 3, 2004, 2:01:12 PM, you wrote: >> >> > Hi, >> >>

Re: [PHP-DEV] New exceptions mechanism

2004-02-10 Thread Andi Gutmans
Does this still segfault for you? It doesn't for me. Andi At 11:29 PM 2/4/2004 +0100, Marcus Boerger wrote: Hello Andi, Tuesday, February 3, 2004, 2:01:12 PM, you wrote: > Hi, > We rewrote the exception support. It fixes a few limitations and bugs in > the old implementation, and allows except

Re: [PHP-DEV] New exceptions mechanism

2004-02-04 Thread Zeev Suraski
I submitted a fix for this (as I suspected, it appears to be more of a bug in zend_call_function() than a bug in the new exceptions mechanism)... I'm not 100% sure about this fix as I didn't have time to investigate it too much, but it appears to be correct, and I wanted to allow you to go on

Re: [PHP-DEV] New exceptions mechanism

2004-02-04 Thread Zeev Suraski
At 00:29 05/02/2004, Marcus Boerger wrote: The new exception implementation looks a bit nicer but needs some tweaks. Try this code: A bit? It's a helluva lot nicer :) php -r 'reflection_class::export("xyz");' which dirctly segfaults. What happens is that the class xyz does not exist and reflectio

Re: [PHP-DEV] New exceptions mechanism

2004-02-04 Thread Marcus Boerger
Hello Andi, Tuesday, February 3, 2004, 2:01:12 PM, you wrote: > Hi, > We rewrote the exception support. It fixes a few limitations and bugs in > the old implementation, and allows exceptions to 'fire' much earlier than > before. > Generally, with the new mechanism, you're not supposed to touc

Re: [PHP-DEV] New exceptions mechanism

2004-02-03 Thread Ferdinand Beyer
On 3 Feb 2004 at 21:54, Adam Bregenzer wrote: > Is there a plan to > implement static variables in php5? --- Quote from ZEND_CHANGES --- * Member variables of classes can now be initialized. Example: my_prop; ?> * Static Methods. The Zend Engine 2.0 introduces the 'static' keyword to declare

Re: [PHP-DEV] New exceptions mechanism

2004-02-03 Thread Stig S. Bakken
Hm, don't think debug_backtrace() can help you much. Reflection could work. - Stig On Wed, 2004-02-04 at 02:14, Alan Knowles wrote: > It is a slightly annoying limitation.. - inherited static methods, cant > guess their called class... > I did look at a fix a while ago - it involved adding a

Re: [PHP-DEV] New exceptions mechanism

2004-02-03 Thread Adam Bregenzer
On Tue, 2004-02-03 at 20:14, Alan Knowles wrote: > It is a slightly annoying limitation.. - inherited static methods, cant > guess their called class... > I did look at a fix a while ago - it involved adding a pointer to the > called class name string, to the exectuter globals, whenever a > f

Re: [PHP-DEV] New exceptions mechanism

2004-02-03 Thread Alan Knowles
It is a slightly annoying limitation.. - inherited static methods, cant guess their called class... I did look at a fix a while ago - it involved adding a pointer to the called class name string, to the exectuter globals, whenever a function is called in the engine... - then to retrieve it be

Re: [PHP-DEV] New exceptions mechanism

2004-02-03 Thread Adam Bregenzer
Stig, On Tue, 2004-02-03 at 17:27, Stig S. Bakken wrote: > Try __CLASS__. Thank you for the reply. This does work for the class the method is defined in, however unfortunately it's not a solution for classes that inherit this method. Here's the sample code I used in my first post: class Foo {

Re: [PHP-DEV] New exceptions mechanism

2004-02-03 Thread Stig S. Bakken
On Tue, 2004-02-03 at 22:47, Adam Bregenzer wrote: > On Tue, 2004-02-03 at 12:12, Ferdinand Beyer wrote: > > If you try to access $this in staticMethod() it will certainly be the > > same as $obj. > > I apologize if this is OT or just generally inappropriate for the > internal list, but I had a qu

Re: [PHP-DEV] New exceptions mechanism

2004-02-03 Thread Adam Bregenzer
On Tue, 2004-02-03 at 12:12, Ferdinand Beyer wrote: > If you try to access $this in staticMethod() it will certainly be the > same as $obj. I apologize if this is OT or just generally inappropriate for the internal list, but I had a question in the general list that is related to this. I was wond

Re: [PHP-DEV] New exceptions mechanism

2004-02-03 Thread Markus Fischer
On Tue, Feb 03, 2004 at 09:51:00PM +0100, Marcus Boerger wrote : > > Point taken. I can definitely live by the additional static keyword > > anyway. > > You should enable E_STRICT severity by error_reporting: E_ALL|E_STRICT > when developing new things. Besides from that the behavior is n

Re: [PHP-DEV] New exceptions mechanism

2004-02-03 Thread Marcus Boerger
Hello Markus, Tuesday, February 3, 2004, 6:19:59 PM, you wrote: > On Tue, Feb 03, 2004 at 06:12:41PM +0100, Ferdinand Beyer wrote : >> On 3 Feb 2004 at 17:34, Markus Fischer wrote: >> >> > However, shouldn't the context be enough, from which a >> function is >> > called, so the stack t

Re: [PHP-DEV] New exceptions mechanism

2004-02-03 Thread Markus Fischer
On Tue, Feb 03, 2004 at 06:12:41PM +0100, Ferdinand Beyer wrote : > On 3 Feb 2004 at 17:34, Markus Fischer wrote: > > > However, shouldn't the context be enough, from which a > function is > > called, so the stack trace displays the information right? > > This is my guess: > In your exa

Re: [PHP-DEV] New exceptions mechanism

2004-02-03 Thread Ferdinand Beyer
On 3 Feb 2004 at 17:34, Markus Fischer wrote: > However, shouldn't the context be enough, from which a function is > called, so the stack trace displays the information right? This is my guess: In your example staticMethod() is not regarded as a _static_ function. Instead, PHP runs it i

Re: [PHP-DEV] New exceptions mechanism

2004-02-03 Thread Markus Fischer
On Tue, Feb 03, 2004 at 04:22:14PM -, Stephane Drouard wrote : > == Quote from Markus Fischer ([EMAIL PROTECTED])'s article > > At least, saying 'InstantiateMe->' looks wrong to me as I'm calling > > 'StaticClass::' actually. > > You have to declare your method as static: > >

Re: [PHP-DEV] New exceptions mechanism

2004-02-03 Thread Stephane Drouard
== Quote from Markus Fischer ([EMAIL PROTECTED])'s article > At least, saying 'InstantiateMe->' looks wrong to me as I'm calling > 'StaticClass::' actually. You have to declare your method as static: Stephane -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visi

Re: [PHP-DEV] New exceptions mechanism

2004-02-03 Thread Markus Fischer
I've a little issue with exception, however this isn't particular bound to the new mechanism and existed before. When calling a static method of a class from an objects method, the stack trace does not reveal the class name of the static class containing the static method.