Re: [PHP] Static methods vs. plain functions

2013-09-19 Thread Sebastian Krebs
2013/9/19 Aziz Saleh > I think that it would be more elegant if you are already in a OOP to keep > the flow and stick to OOP. It just doesn't make sense to me in an > environment that uses OOP to have functions laying around. > buzzword: multi-paradigm. Thats why it could make sense ;) > > Per

Re: [PHP] Static methods vs. plain functions

2013-09-19 Thread Paul M Foster
On Thu, Sep 19, 2013 at 06:28:32PM +0200, Simon Dániel wrote: > Hi, > > I am working on an OOP project, and cannot decide which way to follow when > I have to write a simple function. > > For example, I want to write a function which generates a random string. In > an OOP environtment, it is a m

Re: [PHP] Static methods vs. plain functions

2013-09-19 Thread Aziz Saleh
I think that it would be more elegant if you are already in a OOP to keep the flow and stick to OOP. It just doesn't make sense to me in an environment that uses OOP to have functions laying around. Personally I like to group similar functionality together in their own objects, this way I can reus

Re: [PHP] Static methods vs. plain functions

2013-09-19 Thread Sebastian Krebs
2013/9/19 Simon Dániel > Hi, > > I am working on an OOP project, and cannot decide which way to follow when > I have to write a simple function. > > For example, I want to write a function which generates a random string. In > an OOP environtment, it is a matter of course to create a static class