Re: [PHP] Static constructor support

2012-09-27 Thread David Harkness
On Wed, Sep 26, 2012 at 2:29 PM, Yves Goergen wrote: > How do other languages than C# call that? :-) > Java has "static initializers" which work the same way: they are executed when the class is first loaded and before any code can make use of the class. David

Re: [PHP] Static constructor support

2012-09-26 Thread Sebastian Krebs
2012/9/26 Stuart Dallas > On 26 Sep 2012, at 22:29, Yves Goergen > wrote: > > > On 26.09.2012 23:20 CE(S)T, Stuart Dallas wrote: > >> If you mean what C# calls a static constructor, no that does not > >> exist in PHP, but you can fake it. > > > > Okay, thank you for the quick info. > > > > How d

Re: [PHP] Static constructor support

2012-09-26 Thread Sebastian Krebs
2012/9/27 Yves Goergen > On 26.09.2012 23:38 CE(S)T, Stuart Dallas wrote: > > On 26 Sep 2012, at 22:29, Yves Goergen > > wrote: > >> My class is a debug helper class, that can write trace messages and > >> so on. I have added a random per-request tag to distinguish > >> concurrent requests in th

Re: [PHP] Static constructor support

2012-09-26 Thread Yves Goergen
On 26.09.2012 23:38 CE(S)T, Stuart Dallas wrote: > On 26 Sep 2012, at 22:29, Yves Goergen > wrote: >> My class is a debug helper class, that can write trace messages and >> so on. I have added a random per-request tag to distinguish >> concurrent requests in the trace file and thought that generat

Re: [PHP] Static constructor support

2012-09-26 Thread Stuart Dallas
On 26 Sep 2012, at 22:29, Yves Goergen wrote: > On 26.09.2012 23:20 CE(S)T, Stuart Dallas wrote: >> If you mean what C# calls a static constructor, no that does not >> exist in PHP, but you can fake it. > > Okay, thank you for the quick info. > > How do other languages than C# call that? :-) T

Re: [PHP] Static constructor support

2012-09-26 Thread Yves Goergen
On 26.09.2012 23:20 CE(S)T, Stuart Dallas wrote: > If you mean what C# calls a static constructor, no that does not > exist in PHP, but you can fake it. Okay, thank you for the quick info. How do other languages than C# call that? :-) My class is a debug helper class, that can write trace messag

Re: [PHP] Static constructor support

2012-09-26 Thread Stuart Dallas
On 26 Sep 2012, at 22:13, Yves Goergen wrote: > I couldn't find out whether PHP supports static constructors, and how > the syntax is. The web and the PHP manual don't mention it. So is it not > supported? If it is, is there a PHP version restriction? If you mean what C# calls a static construct

[PHP] Static constructor support

2012-09-26 Thread Yves Goergen
Hi, I couldn't find out whether PHP supports static constructors, and how the syntax is. The web and the PHP manual don't mention it. So is it not supported? If it is, is there a PHP version restriction? -- Yves Goergen - nospam.l...@unclassified.de - http://unclassified.de -- PHP General Mail