SitePoint Sponsor |
|
User Tag List
Results 1 to 25 of 67
-
Jun 18, 2009, 23:50 #1
- Join Date
- Apr 2008
- Location
- Temecula, CA
- Posts
- 278
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Do you really read the php manual?
So, sometimes when I'm bored I read the php manual, and try not to just skim the pages. Tonight was one such instance, and I found something that I think it quite cool, but upon browsing the internet for other opinions, found that some don't exactly feel the same way.
What I found was the goto operator page, located at http://us2.php.net/manual/en/control...tures.goto.php . Upon reading about this operator, new to php 5.3, I instantly thought of ways that this operator was going to clean up certain parts of my code.
I was actually surprised that the majority of other people think that this goto operator is bad, and will create spaghetti code.
This isn't just about the goto operator. As titled, this thread is about reading the manual. I spend a lot of time participating in php related forums, and I can tell that a huge percentage of people have never read a page of the manual. They don't have a clue, and in many cases are just trying to get people to write code for them. I'll be the first to admit that I am no php guru, but at least I try to learn. I do get a lot of help here, and in other forums, and I do appreciate it very much, but for those who haven't read the manual, please know, it is THE MANUAL, and it's not hard to read.
What have you found in the manual lately?
-
Jun 18, 2009, 23:59 #2
- Join Date
- Dec 2008
- Posts
- 120
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I ussually read user comments at the end of the php functions manual. There are a good examples there
-
Jun 19, 2009, 00:14 #3
- Join Date
- Sep 2005
- Location
- Sydney, NSW, Australia
- Posts
- 16,875
- Mentioned
- 25 Post(s)
- Tagged
- 1 Thread(s)
I usually go to the manual when I need to remind myself how a particular function I haven't used for a while works.
Haven't used 'goto' since the last timeI was writing in Cobol (where we used to use it to go to an exit paragraph at the end of the section due to not having a break statement)..Stephen J Chapman
javascriptexample.net, Book Reviews, follow me on Twitter
HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
<input name="html5" type="text" required pattern="^$">
-
Jun 19, 2009, 01:02 #4
- Join Date
- May 2009
- Location
- Ware, UK
- Posts
- 136
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
the manual is an invaluable resource to me and is one of things that makes php great.
i can see how goto can be useful. there have been times when i've had to wrap many lines of code in parenthesis when a goto command would be a lot neater.
I wonder if it works across includes. i.e. will it work if the destination is in an include or if the file is included in another file.
Also will this functionality forever remain in future versions of php if not many people know about it or use it?
-
Jun 19, 2009, 01:07 #5
- Join Date
- Feb 2009
- Location
- England, UK
- Posts
- 8,111
- Mentioned
- 0 Post(s)
- Tagged
- 1 Thread(s)
I have read most of the specifications out there at some point, It makes me wonder if I should get a hobby...
-
Jun 19, 2009, 01:40 #6
- Join Date
- Jul 2007
- Location
- Denmark
- Posts
- 162
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
You can download the PHP manual in .chm format, which think is easier to use for quick lookups.
http://us2.php.net/download-docs.phpzalucius
-
Jun 19, 2009, 02:23 #7
- Join Date
- May 2009
- Posts
- 65
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Hi all,
Here in my company all of us call php manual as GEETA( Holy Book for Indians).You see you will get all the things at one place and you dont have to go any where if you are a good friend of php manual.
I have .chm as well and it helps a lot ,I also like the examples as most of the time my problems have solutions in those examples.
noddy
-
Jun 19, 2009, 03:04 #8
- Join Date
- Oct 2006
- Location
- France, deep rural.
- Posts
- 6,869
- Mentioned
- 17 Post(s)
- Tagged
- 1 Thread(s)
Originally Posted by skunkbad
[ fphp ]strtolower[ /fphp ] (without the spaces) gives strtolower.
If they then come back and clearly did not even bother rtfm then you know to block/ignore/scold them.
I do think the manual is overwhelming for new scripters, and I certainly noticed an upward curve in my use of it a) as I learned more but even more so when I b) found sitepoint.
The .chm is always open in another window on my system (win32 thank god for Virtuawin), and I bemoan the fact that no longer contains user comments - so I have to go online to get some real world checks on what I want to do.
-
Jun 19, 2009, 03:04 #9
- Join Date
- Jun 2008
- Location
- Gloucestershire, UK
- Posts
- 197
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
The W3C School has a complete function list, which is sometimes a bit easier to get your head around.
http://www.w3schools.com/php/default.asp
Cheers,
Jon
-
Jun 19, 2009, 03:43 #10
- Join Date
- Sep 2006
- Location
- Nottingham, UK
- Posts
- 3,133
- Mentioned
- 1 Post(s)
- Tagged
- 0 Thread(s)
I read the manual occasionally, yes, can learn some interesting things!
'goto' is generally considered bad in most/all languages, it makes your code a bit unpredictable almost - jumping off somewhere else half way through a loop etc. It can be a bit of a nightmare to debug, and there is pretty much always a better way of doing it.
-
Jun 19, 2009, 05:07 #11
I may be a tad biased (being on the PHP documentation team) but the manual is an invaluable resource to me. Pretty much everye day there will be at least one time where I type php.net/something into Firefox, often to point peoples' questions to the relevant manual page. One thing that I must encourage people to do is give feedback. User notes bring a lot of extra value to the manual pages and if you notice a problem with a manual entry, please report it as a documentation bug (bugs.php.net, remember to search the bugs list first).
With regards to goto, it's just another tool in the developer's arsenal. Some will use it appropriately, some will avoid using it at all and yet others will use it at every opportunity even when it is not the right tool for the job.
-
Jun 19, 2009, 07:21 #12
- Join Date
- Jul 2006
- Location
- Ontario, Canada
- Posts
- 424
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Likewise.
However, I'd like to point out that, if you add the PHP Manual search extension to Firefox, you can set the keyword in the search engine list. That way, you can simply type php functionnamehere into the AwesomeBar and away it goes!
-
Jun 19, 2009, 07:57 #13
- Join Date
- Jan 2008
- Location
- Denver, Colorado
- Posts
- 86
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
The Manual has always been the single source for me. I mean, I never bought a book about PHP just because I don't need additional advice.
However, sometimes people put up good examples elsewhere, explain some topic, so sometimes I search for a problem in Google.
-
Jun 19, 2009, 07:58 #14Off Topic:
I also have a search box addon which means it's simply Command-K (Ctrl-K I guess for windows), search term, enter to be sent to a PHP Manual page. However, it's just habit to type Command-L (Ctrl-L) php.net/blah !
-
Jun 19, 2009, 08:09 #15
- Join Date
- Oct 2002
- Location
- Scotland
- Posts
- 3,631
- Mentioned
- 2 Post(s)
- Tagged
- 0 Thread(s)
-
Jun 19, 2009, 08:12 #16
- Join Date
- Jul 2006
- Location
- Ontario, Canada
- Posts
- 424
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Off Topic:
Using Ctrl+K works great, if the only thing that you search for is PHP functions!
I also have the MySQL and Sitepoint reference installed as search engines, and I frequently use the search box for Google searches. That means I can't just leave PHP selected (and I couldn't find any keyboard shortcuts to change it either).
This means that I can type:
- php functionname to find a PHP function
- sql termname to find an SQL term
- web termname to find a JS/HTML/CSS term
- wiki whatever to find a Wikipedia entry
...all after a single Ctrl+L!
-
Jun 19, 2009, 08:44 #17
Well, Manual is always a very good resource for me. I always look for the funtions specifications in the manual by using the search over there in the manual.
-
Jun 19, 2009, 09:46 #18
- Join Date
- May 2008
- Posts
- 182
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Stair Lifts & Residential Dumbwaiters, source of health news
-
Jun 19, 2009, 10:08 #19
- Join Date
- Jul 2006
- Posts
- 5
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Yes, I read it regularly
-
Jun 19, 2009, 10:55 #20
- Join Date
- Jul 2008
- Posts
- 5,757
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I've spent countless hours reading it. Lately I've been looking at the new stuff in spl coming in 5.3
I also started reading the c source code a bit to see how certain things work when the manuals documentation is lacking.
But I think the main reason why some people avoid the manual is because they have a hard time understanding it. While it's pretty beginner friendly as far as documentation for a programming language goes, a lot of it still requires you understand the documentation conventions, as well as other terms and aspects of the language. And for a lot of people, this means they get little out of it. But, I think these people will stay at a beginner level for a long time until they learn to use it.
-
Jun 19, 2009, 10:57 #21
-
Jun 19, 2009, 10:58 #22
-
Jun 19, 2009, 11:00 #23
- Join Date
- Jul 2006
- Location
- Ontario, Canada
- Posts
- 424
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
-
Jun 19, 2009, 11:07 #24
-
Jun 19, 2009, 11:10 #25
- Join Date
- Jul 2006
- Location
- Ontario, Canada
- Posts
- 424
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Wow, did not know that!
Although, I still prefer the search extension method so I don't require the extra bookmark.
Bookmarks