Basically, the title says it all. Is there any established standard that describes in what order to place public
, protected
and private
methods and properties inside a class?
Asked
Active
Viewed 39 times
1

Alex Lomia
- 6,705
- 12
- 53
- 87
-
1Quick tip - not really an answer: do you know the "Rearrange Code" function of php storm (and all other IntellyJ IDEs? I always find the way it arranges my code interesting and useful. It may also give you a hint at good/best practices. – Barthy Jul 31 '16 at 10:18
-
@Barthy nice idea, thanks. Will look at it – Alex Lomia Jul 31 '16 at 10:21
-
1How is this is duplicate of [that question](http://stackoverflow.com/q/1760850/2936460)? That one is asking for general advice, while this one is specifically asking for a PHP coding standard. Voted to reopen. – SQB Apr 04 '17 at 07:22