Re: [PHP] Static constructor support

2012-09-27 Thread Yves Goergen
On 26.09.2012 23:38 CE(S)T, Stuart Dallas wrote: On 26 Sep 2012, at 22:29, Yves Goergen nospam.l...@unclassified.de 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

Re: [PHP] Static constructor support

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

Re: [PHP] Static constructor support

2012-09-27 Thread Sebastian Krebs
2012/9/26 Stuart Dallas stu...@3ft9.com On 26 Sep 2012, at 22:29, Yves Goergen nospam.l...@unclassified.de 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

Re: [PHP] Static constructor support

2012-09-27 Thread David Harkness
On Wed, Sep 26, 2012 at 2:29 PM, Yves Goergen nospam.l...@unclassified.dewrote: 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

[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

Re: [PHP] Static constructor support

2012-09-26 Thread Stuart Dallas
On 26 Sep 2012, at 22:13, Yves Goergen nospam.l...@unclassified.de 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#

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

Re: [PHP] Static constructor support

2012-09-26 Thread Stuart Dallas
On 26 Sep 2012, at 22:29, Yves Goergen nospam.l...@unclassified.de 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