Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialEthan Neff
27,058 PointsWhy do you keep switching from camelCasing and underscore for variable naming?
The arguments for get_product_subset() are camel cased, while the majority of your other code is using underline variable formatting.
1 Answer
Matthew Orndoff
9,018 PointsIt's totally a matter of preference, and really doesn't matter as long as you're consistent. A lot of devs have their own preference, but for larger projects there are usually code standards set up.
Here's a list of the different naming conventions in some PHP frameworks. They are consistent in that they're all basically different.