doubledee Posted November 26, 2011 Share Posted November 26, 2011 What style do you use for your PHP file names? For my CSS styles, I like to use camelCase (e.g. "boxUpcomingEvents{}"), but for PHP file names I have been using underscores (e.g. "some_long_file_name.php"). I think one reason I use underscores is that depending on your environment, case-sensitivity may or may not apply. So "helloWorld.php" could be treated the same as "helloworld.php" by your file system. Comments? Suggestions? Debbie Quote Link to comment https://forums.phpfreaks.com/topic/251845-file-names/ Share on other sites More sharing options...
creata.physics Posted November 26, 2011 Share Posted November 26, 2011 To me it's just personal preference. I've been using periods for file names (e.g. "class.name.php"). For main class names I use camelCase, and for more independent classes I use underscores. Quote Link to comment https://forums.phpfreaks.com/topic/251845-file-names/#findComment-1291362 Share on other sites More sharing options...
Philip Posted November 26, 2011 Share Posted November 26, 2011 I tend to follow Zend's coding standards for most things, mainly because the file name is associated with the class name Quote Link to comment https://forums.phpfreaks.com/topic/251845-file-names/#findComment-1291402 Share on other sites More sharing options...
doubledee Posted November 26, 2011 Author Share Posted November 26, 2011 I tend to follow Zend's coding standards for most things, mainly because the file name is associated with the class name So I don't have to read a 1,000 page manual, care to be a little more specific?! Debbie Quote Link to comment https://forums.phpfreaks.com/topic/251845-file-names/#findComment-1291404 Share on other sites More sharing options...
Philip Posted November 26, 2011 Share Posted November 26, 2011 ... there are 4 pages on the coding standards. Quote Link to comment https://forums.phpfreaks.com/topic/251845-file-names/#findComment-1291405 Share on other sites More sharing options...
MasterACE14 Posted November 27, 2011 Share Posted November 27, 2011 I tend to follow Zend's coding standards for most things, mainly because the file name is associated with the class name So I don't have to read a 1,000 page manual, care to be a little more specific?! Debbie Naming Conventions one click and you would of been there......... Quote Link to comment https://forums.phpfreaks.com/topic/251845-file-names/#findComment-1291486 Share on other sites More sharing options...
doubledee Posted November 27, 2011 Author Share Posted November 27, 2011 MasterACE14, Thanks! Debbie Quote Link to comment https://forums.phpfreaks.com/topic/251845-file-names/#findComment-1291488 Share on other sites More sharing options...
KevinM1 Posted November 27, 2011 Share Posted November 27, 2011 I tend to follow Zend's coding standards for most things, mainly because the file name is associated with the class name So I don't have to read a 1,000 page manual, care to be a little more specific?! ...really? Quote Link to comment https://forums.phpfreaks.com/topic/251845-file-names/#findComment-1291619 Share on other sites More sharing options...
.josh Posted November 28, 2011 Share Posted November 28, 2011 As someone who writes technical manuals and docs for a living, I advise you to take the time to read it, even if it's a lengthy read. For sure, not all 1k pages are relevant to this situation, but I'm positive they are all relevant to a situation. No doubt one of the best ways to improve yourself as a programmer is to RTFM Quote Link to comment https://forums.phpfreaks.com/topic/251845-file-names/#findComment-1291905 Share on other sites More sharing options...
KevinM1 Posted November 28, 2011 Share Posted November 28, 2011 As someone who writes technical manuals and docs for a living, I advise you to take the time to read it, even if it's a lengthy read. For sure, not all 1k pages are relevant to this situation, but I'm positive they are all relevant to a situation. No doubt one of the best ways to improve yourself as a programmer is to RTFM The doc in question was a grand total of 4 distinct pages. Somewhat lengthy (coding conventions can be long and dry), but hardly an insurmountable task for someone with 5-10 minutes on their hands. Quote Link to comment https://forums.phpfreaks.com/topic/251845-file-names/#findComment-1291910 Share on other sites More sharing options...
Philip Posted November 28, 2011 Share Posted November 28, 2011 As someone who writes technical manuals and docs for a living, I advise you to take the time to read it, even if it's a lengthy read. And all of your docs are TLDR's Quote Link to comment https://forums.phpfreaks.com/topic/251845-file-names/#findComment-1291921 Share on other sites More sharing options...
KevinM1 Posted November 28, 2011 Share Posted November 28, 2011 As someone who writes technical manuals and docs for a living, I advise you to take the time to read it, even if it's a lengthy read. And all of your docs are TLDR's Quote Link to comment https://forums.phpfreaks.com/topic/251845-file-names/#findComment-1291926 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.