I like my bookmarkletMainly because I can highlight text on the page and click it, and off it goesCode:javascript:q=document.getSelection();if(!q)void(q=prompt('PHP man:',''));if(q)location.href='http://www.php.net/'+escape(q)![]()
| SitePoint Sponsor |
I like my bookmarkletMainly because I can highlight text on the page and click it, and off it goesCode:javascript:q=document.getSelection();if(!q)void(q=prompt('PHP man:',''));if(q)location.href='http://www.php.net/'+escape(q)![]()
i had to read the manual cuz i had php course at the university but still most of the things i've learned working and copy pasting from internet stuffs already made and also reading forums.![]()

That is very true, and was what I started out trying to say.
As for searching for examples of code use, if you are a FF user, install the search for Google Code.
This allows you to easily search for real-life code samples, especially useful for functions or classes you only use rarely, or like me, despite your having rtfm you still cannot see the point of something.
Say you didnt know how people would use DirectoryIterators, you can then easily search using DirectoryIterator lang:php


Wow, quite a response to my post. Obviously we read the manual, but I'm hearing a few times that it is not so beginner friendly. I think it would be great to have list some tips on how to use the manual. For instance, I didn't know for a long time that function parameters in square brackets were optional.



Not cover to cover.
But I usually find myself there when I'm looking for something in particular.
That and Tizag.
Trying to fill the unforgiving minute
with sixty seconds' worth of distance run.
i try to read, and plan to read the whole thing over the next 6 months.. when i first started learning, i didnt quite understand anything, and thought it was officially the worst manual out on the net, and still think it is quite bad, in regards to examples and comments about it.. but can understand since it is open source.
ive read that manuals for newbies is quite scarce, but as you become more and more experienced. there is alot more usful material out there.

I found that the pretty cheap book "PHPArchitects Zend PHP5 certification guide" provided me with very structured checklist of programming subjects - very easy to read and understand. It explains a few basic principles then expects you to dive into the manual to find out more, you can start from page 1 and work your way through the book/manual.
It's a big like having a friend or uncle who is knowledgeable on a subject, like fishing or golf or driving who enthuses you and can explain the really basic things in simple phrases.
It is then up to you to seek out "chapter and verse" in the manual, and sometimes you will need to come back here, to SP for clarification when you have questions.
Setting out and sticking to a learning schedule from the chapters in that book and using the triumvirate of the book, the manual and SP is the killer PHP learning environment - and one I wish I had discovered years before.
I came across this article, which discusses the goto statement. In it, this blog showcases an example of using goto without getting out of hand.
And yes, I use the php manual, as it is indispensable.
EDIT - Speaking of the php manual... The home page of php | architect has a link discussing the push for bringing the documentation up to speed (from Rasmus Lerdorf no less!).





No, that's what forums like SitePoint are for.
Which isn't to say the PHP Manual is useless, but it is written for geeks, not beginners. When I first started learning PHP, I found it almost worthless. Now that I understand PHP a little better, it's a little easier to understand - but I still prefer forums. Forums allow you to explain exactly what you're trying to do and (hopefully) connect with someone who understands your problem and is willing to explain the solution.
There's also a time factor: For those of us who are writers, not programmers, and have "real" jobs and hopefully some sort of social life, there just isn't a lot of time for studying manuals (PHP, MySQL, JavaScript, Flash and on and on and on).
I refer to the PHP manual pretty much every single day. Seems like 80% of the questions out there can be answered simply by referencing the manual.
More like forums like these are increasingly becoming a place for people who are too lazy to take any self initiatives in learning for themselves and thus want everything handed to them on a silver platter (because after all, being self reliant / self efficient is over rated..pftt.. why teach a man to fish [so that he can eat for a life time] when he can simply ask people to give him a fish on a daily basis?). I'm not opposed to helping people.. but I am seeing an emerging trend of people who just want the easy way out, despite the fact that they are posting on a developer's forum (which should imply that if someone's a member there, they are interested in actually learning to develop, as opposed to using it as a free problem solving service).
That's what freelance services are for. As I just mentioned, if you're on a developer's forum, it's generally expected that you're genuinely interested in learning development as opposed to treating forums as a problem solving drop-off service.Originally Posted by geosite
And programming isn't a "real" job? Hmmm...



Are you sure you want to keep name-calling the people whose help you rely on ?Originally Posted by geosite
Trying to fill the unforgiving minute
with sixty seconds' worth of distance run.





Is SitePointe a "developer's forum"? I was under the impression that it covered just about all bases, with forums for beginners to experts, covering everything from basic web design to programming to blogging to SEO.
Actually, it is - or can be. I was referring to "real jobs" as in traditional, non-IT jobs. For those us us who aren't employed in IT, web design is something of a hobby, while we pay the rent with a "real job."And programming isn't a "real" job? Hmmm...
Dude, you're posting in a PHP forum.. last time I checked, PHP is a web dev language for useful stuff like generating dynamic web content. If you go back and re-read my initial response, I never said Sitepoint in it's entirety is for 'developers'.. Since this is a PHP specific forum, yeah, I consider this is a developer's forum. There are many forums in Sitepoint (and yes, not all are for developers..some for writing, some for design, etc...). But I would be hard pressed to find anyone worth their salt who would not consider PHP as web development (and instead as a general thing / topic). This is a developer's forum.
Yeah but just because people like you dabble into web / IT as a hobby doesn't correctly label web dev / programming / IT as non "real" jobs... There are plenty of people within those professions that do very well for themselves financially and support themselves and their families quite well (full time work included). By your notion, if you 'toyed around' with car engines, you'd label actual mechanics as non "real" jobs, afterall, you don't do this for a living, you do it as a hobby while paying the rent with a "real" job. Those mechanic chumps who do this every day full time to pay their rent can't be possibly doing a "real" job.Originally Posted by geosite
*whistles* wow.. all I can say is your definition of a "real" job is terribly skewed.





Dude, I've worked as a wildlife biologist, a teacher and in the mail industry, and the vast majority of people I've worked with would not regard programming as a real job. And before you blow a gasket, that isn't an insult. Most people look upon programmers and even general web designers with a sense of awe. They're generally considered exceptionally intelligent, and many people think they all make $100,000 a year or more.
For most people, that is NOT a real job. Keep in mind, also, that many people in the IT industry have very flexible hours and/or telecommute. Again, you may consider that a "real job," but there are millions of people working more traditional jobs who would disagree.
So I suppose the correct definition of a "real" job is only accurate when defined by an ex wildlife biologist, ex teacher and ex mail worker. Don't get me wrong, I can see from your standpoint that you treat webdev as a hobby.. but to even think that just because it doesn't match your view, webdev, programming or IT isn't a "real" job doesn't make it an accurate statement in the grand scheme of things, no matter who many people agree with you.. after all, the world , as it turns out, isn't so flat after all).
I'm not offended (and I'm not a programmer / web developer either.. I, like you, do this [web stuff] more as a hobby than anything else). You're not insulting me, and I'm not taking your answer personally (sorry if it comes off that way). I do, however, think that your response / mindset to this entire concept of what a "real" job is not accurate in the slightest.. Everyone who chooses a profession (and yes, web developers, programmers and IT are professions that demand skill and talent which like many (most?) other professions, take time to cultivate to do the job right (sure, there are idiotic bad developers that should be shoveling crap on a farm instead - but I digress). Like other professions, having something done right requires considerable investment in time (and perhaps money if we start involving college / universities) to cultivate a skill set that employers find valuable and worth paying for.Originally Posted by geosite
So you know for fact that most people don't consider IT and the like as real jobs? You think flexible hours / telecommuting has any bearing on what a "real" job is? Have you not considered perhaps the corporate employer's culture? What if a company lets professionals work from home or offer flexible hours? Not everyone has to work from exactly 9-5 to qualify as a "real" job. Not everyone has to travel x amount of distance to go to a certain place for it to be a "real" job.Originally Posted by geosite
Perhaps by being around the people and the professions you were involved in (and I'm not knocking you nor the professions you chose down), the mindset is 'old fashioned'. In case you haven't noticed, computers / technology are a huge driving force in where we are headed.
Make no mistake, we are a technological race that isn't about to put down our keyboards anytime soon.. we need IT / programmers / developers for much of the technology we take for granted (and I might add that the technological drive only continues forward at a feverish pace). And I can't possibly see how such a massive combined set of industries involving technology would not be considered a "real" job. Your terms / definitions of what determines a real job (not toying around with something as a hobby, only set strict start and end times, the need to commute as opposed to telecommuting) is IMO outlandish (and I'm sorry if I offend you here, as this is the best choice of words at the moment without crossing over into political incorrectness).
You haven't insulted me, but by claiming programming isn't a "real" job, you may have offended others who have invested huge amounts of time, energy and money to get into a field that yields to great financial rewards coupled with perks like flexible time tables so that they can provide for themselves and their families.
Sorry sir, your definition simply doesn't hold any water.





Do you consider surgery a "real job"? How about President of the U.S.? Acting in a major motion picture or recording a hit song?
All of those (usually) require an enormous commitment and lots of training and sacrifice. Yet many people - and I would guess the mast majority - would not consider any of them a "real job."
The term real job - as I understand it - refers to a traditional job. That generally means working relatively fixed hours, usually for a relatively modest salary.
It's also worth noting that many people who offer advice on SitePoint and other forums aren't employed in the IT industry to begin with. Many are beginners or hobbyists. Check out their signatures, and you'll see that some of them are actively seeking employment, "real" or otherwise.
I'm not sure who you hang out with, but yeah, I would consider surgeons, the presidency and acting / singing as real jobs.
Hence 'old fashioned' (as I suspected). Times are changing. It's as simple as that. We're in a society that is in constant flux. What was once traditional then might not be so traditional now. People used to traditionally ride in horse carriages.. until the car came along (so much for tradition, as now people traditionally travel in motorized vehicles). The profession landscape is not static.. it's always evolving... So your definition of a real job (fixed hours with modest salary) only differs with IT in the fixed vs flexible hours.. IT people still have to put in their 7.5 or 8 or whatever hours a day.. I worked in the electronic gaming industry for a decade (you wouldn't consider it as a real job, as hours are indeed flexible.. but make no mistake, you can't just come in whenever you want (like say noon) and leave whenever you want (like say 4pm). While many companies allow flexible hours, they still require your normal amount of hours in a day).Originally Posted by geosite
No dispute there. I'm not saying that all people on these forums are all established professionals. But I'd wager there are some people on these forums who are professionals in webdev / programming that do this for a living.Originally Posted by geosite
It is bad. It does create spaghetti code. There is always a better way. Marginally better readability is no excuse for organizing your code with it. It's a remnant of the dark ages of code before functions and object notation. There is no reason to use goto in PHP. There is always a better way.
That blog post only shows one example of using GOTO, and then he shows how to do it better with exceptions. In some languages the only way to do certain things is using a goto statement. PHP is not one of those langugages.
If you read to the very bottom of that blog post:
Yes, I know the key word here is perceived limitation of working with exceptions. Don't get me wrong, I prefer working with exceptions myself. But the manner in which the goto was demonstrated wasn't bad IMO (although again, I would prefer the exceptions).The conclusion on my second talking point was that goto can be used to overcome some of the perceived limitations of working with exceptions in a batch/procedural execution model. Without the support of an event-driven execution model, and without a dedicated retry-type statement, programmers need to resort to looping constructs. The code that results can be brittle and difficult to maintain over time. goto offers an eloquent and succinct alternative.
I would be more concerned with people starting to throw goto statements all over the place and run loose and wild instead of small focus areas like the author has done.
sometimes yeah


Yes I like to read the manual and use it when I forget something - I have downloaded the PHP, MySQL and Smarty .chm versions of the manuals. They are great![]()
a new day, a new beginning
never follow the crowd, the crowd is poor!



Some software, like NuSphere phpED, has the important part of the manual pop up after you type the function name. There's even a popup for user defined functions that gives you the argument list.
Nusphere is my home software and I love it, but at work I use TextPad and I'm turning to the manual constantly. More often than not, it's to check the argument order.
Every once in a while I find myself in the references:
http://us3.php.net/manual/en/ref.array.php
http://us.php.net/manual/en/ref.strings.php
After years of coding in PHP I sometimes find myself predicting that a premade function exists, and find it in the references.
e39m5
Bookmarks