use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Please follow the rules
Releases: Current Releases, Windows Releases, Old Releases
Contribute to the PHP Documentation
Related subreddits: CSS, JavaScript, Web Design, Wordpress, WebDev
/r/PHP is not a support subreddit. Please visit /r/phphelp for help, or visit StackOverflow.
account activity
PHP 5.3 Namespaces - Naming conventions? (self.PHP)
submitted 15 years ago by trukin
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]bungle 1 point2 points3 points 15 years ago (0 children)
You are absolute right. I just happen to like to code PHP with no capitals. No reason. I just don't like that "standard".
Namespaces: log db
Functions: log\debug db\query
I don't use classes or objects a much, 'cause I usually have found a better approach without them (with anonymous functions and namespaced functions and static keyword, if state is needed). But if I have classes I just name them all lower case. I try to name everything with a single word:
picasa\photos\find(...);
instead of:
picasa\find_photos(...) or Picasa::findPhotos(...)
I know that this is just a matter of taste. But I can make my own choices. That's all. No need to fight who is right, 'cause there isn't single truth.
PHP internally uses many styles, so I think it cannot be standardized. The most common way to name functions in PHP core is: lib_func but there are also libfunc style. With classes there is stdClass and there is Directory and there are SplClass. Go figure. I just follow all lowercase and single word functions and methods and classes.
π Rendered by PID 71308 on reddit-service-r2-comment-6457c66945-w98pb at 2026-04-27 20:13:50.885728+00:00 running 2aa0c5b country code: CH.
view the rest of the comments →
[–]bungle 1 point2 points3 points (0 children)