Slashdot Mirror


Core PHP Programming

honestpuck writes "One of my key concerns when reviewing a good book is the pull between information density and a light, easily read style. I believe that as we get further along the learning curve we can sacrifice some readability for density -- we want more facts and less explanation." Read on for honestpuck's take on the third edition of Core PHP Programming to see how well it achieves that balance. Core PHP Programming (3rd Edition) author Leon Atkinson with Zeev Juraski pages 1041 publisher Prentice Hall PTR rating 9 reviewer Tony Williams ISBN 0130463469 summary Good comprehensive guide for beginner to expert

The authors of Core PHP Programming have found a marvelous middle ground. Toward the beginning of the book they have a great deal of light, explanatory material as they cover the basics of PHP. As they move towards more advanced topics there is less explanation and a tighter packing of information. At the same time the book has a large number of small code examples throughout, making sure that you know how to use the functions under discussion.

This is the third edition and I must admit that I had not come across it in either the first or second editions, so I have no great way of comparing them in this review. It has certainly been revised to take into account the changes for PHP 5 and examining the table of contents for the second edition on Safari I can see the that the basic structure has remained the same while the book has grown about 300 pages. The addition of Zeev Suraski as co-author can only be to the benefit of the quality of the information, particularly regarding PHP 5.

The book starts with the absolute rock bottom of PHP, the basic data types and operators through to efficiency, debugging and design patterns. Along the way it covers almost all aspects of PHP 5 with a readable reference style. The 'Core' in the title of this book is a key to understanding it. If you're looking for a book with all the code required to handle session management, or user logins and security (to mention two possibilities) then this isn't the book for you. If, however, you are after a book that more than adequately explains the power and nuances of PHP and programming in the language then this is a marvelous volume.

It's broken up into 5 sections: "Programming PHP," which covers the basics of data, control flow and I/O; "Functional Reference," which is 600 odd pages broken up into 12 chapters that seems to cover every PHP function (a check of three sub chapters showed every function mentioned on the topic at PHP.net was also in the book) and does it well with good explanation and code examples; "Algorithms," which details a number of methods of performing routine tasks such as sorting, parsing and generating graphics; and "Software Engineering," devoted to design, efficiency and design patterns; and finally, there are a seven excellent appendices.

Taken as a whole it does a good job of covering the whole language and the ways of using it.

I can imagine it would make a good companion volume to my other favourite PHP volume, PHP and MySQL Web Development, which tends more towards recipes and leaves out the encyclopedic coverage of this book.

Leon Atkinson has a good page for the book that includes a link to download all the code and examples, a link to the Prentice Hall page for those wanting an example chapter or a look at the Table of Contents and some other reviews. His site also has a page for the inevitable errata, currently blank. While I did find only one typo (not in example code) I can't claim to have read every page or run all the code examples.

I'd recommend this volume to anyone who wanted a comprehensive guide to PHP 5. It is probably useful at almost all levels.

You can purchase Core PHP Programming, 3rd Ed. from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.

223 comments

  1. Needed? by Tyler+Eaves · · Score: 2, Insightful

    Does one really need a 1000 page reference on PHP? The online documentation is free, downloadable, and quite complete.

    --
    TODO: Something witty here...
    1. Re:Needed? by kev0153 · · Score: 5, Funny

      Dang you beat me to the obligatory "Online Documentation is good enough" quote that always comes up with these php book reviews. I needed some karma today.

    2. Re:Needed? by Anonymous Coward · · Score: 1, Insightful

      Then don't buy the book. Many of us like dead trees we can flip through.

    3. Re:Needed? by pogle · · Score: 4, Interesting

      Indeed. When I was first learning PHP and doing a lot of local testing, I just downloaded the whole doc to my PDA. Easy searching, and remembers my place even if I close the cover ;)

      I will admit I've got 2 O'Reilly books on PHP (Programming and the Cookbook) but more often than not its easier to just hop on their site and search there. The books are there to look cool with the rest of my O'Reilly collection.

      Personally I like the user comments in the online docs the best. Half the time someone's already written some small function that I'm looking for, or quite adequately explained all the various cases of some esoteric function return.

      --
      http://thechubbyferret.net - Ferret pictures and informative links.
    4. Re:Needed? by Matrix9180 · · Score: 2, Informative

      I have this book myself, and I can say that it puts the documentation in a much more readable form, and just a FYI, most of the online documentation has NOT been updated for PHP5. Think before you submit next time.

      --
      120chars for a sig is teh suck
    5. Re:Needed? by RetroGeek · · Score: 5, Insightful

      Does one really need a 1000 page reference on PHP? The online documentation is free, downloadable, and quite complete.

      The online docs do not say HOW to program in PHP.

      Yes, they are a great reference, and actually are the best online docs I have seen (mostly due to the comments), but you still need to know how to program to use them.

      OTOH, a good programming book will step you through on HOW to use the various functions, not just what the functions do. Things like layering, magic number constants, security etc.

      --

      - - - - - - - - - - -
      I am a programmer. I am paid to produce syntax not grammar. Deal with it.
    6. Re:Needed? by heironymouscoward · · Score: 2, Interesting

      Harkins' Law of Dead Trees: "The same people who refuse to read the copious free online searchable documentation until they come across an unsurmountable problem will rush out to spend $39.95 on a 1000-page book containing essentially the same information."

      --
      Ceci n'est pas une signature
    7. Re:Needed? by Anonymous Coward · · Score: 3, Insightful

      Maybe because PHP5 isnt finalized yet? Kinda stupid to update comprehensive docs for a changing beta...this book would've done better for wait for 5's final release.

      Your comment is rather disjointed, were you trying to link between online docs being unreadable and php5 docs not being online, while claiming the book is exactly opposite, with easy to read PHP5 documentation? Or do you just suck at typing?

    8. Re:Needed? by hendridm · · Score: 1

      Although the PHP.net documentation is excellent, sometimes their examples leave much to be desired. There is usually more than one way to accomplish something in PHP, and if you don't know what you're doing you may not know what to look for. A book can show you the best way to do things and provide examples to help you visualize real-world uses.

    9. Re:Needed? by Anonymous Coward · · Score: 0

      God, how you suck. Unbelievable. What do you do for a living?

    10. Re:Needed? by iamdrscience · · Score: 1
      The online docs do not say HOW to program in PHP.
      Actually, it does, check it out: http://www.php.net/manual/en/

      The first five sections (especially the first to) are more than adequate in teaching how to program in PHP.
    11. Re:Needed? by DAldredge · · Score: 1

      Stare at a Viewsonic P815 21 inch monitor, and I still like paper. Hell, I like it better that LCDs too.

    12. Re:Needed? by RetroGeek · · Score: 1

      Actually, it does

      The Simple Tutorial does not begin to cover proper Web programming.

      Yes you can throw up a simple page(s) in no time flat, but try to develop (and I MEAN develop) a proper muti-tier site and you need programming books (and hopefully courses, experience, etc).

      As has been posted on Slashdot time and time again, without proper design a Web site can be hard to secure, enhance, change the UI, change the DB engine, add new functionality, etc.

      --

      - - - - - - - - - - -
      I am a programmer. I am paid to produce syntax not grammar. Deal with it.
    13. Re:Needed? by Anonymous Coward · · Score: 0

      clearly

    14. Re:Needed? by Anonymous Coward · · Score: 0

      Maybe because PHP5 isnt finalized yet? Kinda stupid to update comprehensive docs for a changing beta...this book would've done better for wait for 5's final release.

      So you would rather have a book that was thrown together in a week or so as soon as PHP5 is released?

    15. Re:Needed? by the_duke_of_hazzard · · Score: 2, Interesting
      I had an argument today with someone who mocked me for printing out an email and scribbling my responses to the points before typing them up.

      I pointed out that a pen and paper have a very high resolution indeed compared to a monitor and the gui is very flexible and quick.

      Similarly, a book is easier on the eyes, very portable, well-indexed, has a consistent format and quality and probably has been better-edited.

    16. Re:Needed? by Anonymous Coward · · Score: 0

      I would rather have a book that documented PHP5 after its release than a PHP4 rehashed-for-the-third-time edition, yes.

    17. Re:Needed? by lisany · · Score: 0

      As has been posted on Slashdot time and time again, without proper design a Web site can be hard to secure, enhance, change the UI, change the DB engine, add new functionality, etc.

      Repeat after me: "Programming las a learning curve." People don't start their programming careers by writing complex things. They start simple - with a fixed database and UI. Then they expand their knowledge as they learn how to do more.

    18. Re:Needed? by RetroGeek · · Score: 1

      No argument from me. Heck, that is how I started.

      BUT, don't write bet-your-business apps at the beginning.

      --

      - - - - - - - - - - -
      I am a programmer. I am paid to produce syntax not grammar. Deal with it.
    19. Re:Needed? by JimDabell · · Score: 1

      I have an earlier edition of this book, and I was massively underwhelmed. It was as if somebody printed out the online manual and prefixed it with a few average tutorial chapters. The actual useful content of the book to a beginner was approximately a quarter of the overall page count.

      I can't say whether or not this edition has improved the situation, but if the publisher was willing to churn out such a low-quality book before, I don't have high hopes for this new edition, especially as it seems to be aimed at cashing in on the release of the new PHP5.

    20. Re:Needed? by Christianfreak · · Score: 1

      If you need to learn HOW to program you need to start with something other than PHP. A good programmer should be able to learn the syntax of a new language and be able to program in it just as easily as any other language.

      *troll* Of course since PHP breaks many commonly accepted practices of good programming by default, HOW to program might be appropriate for it. ;-) */troll*

    21. Re:Needed? by betis70 · · Score: 1

      Sometimes its nice to see language idioms "in-the-wild" though. Not sure how useful that is for PHP since I haven't learned it yet.

      I guess you can get that from studying Open Source PHP code, but sometimes having more commentary is helpful to get you up to speed.

      --
      I forget...are we at war with Eurasia or East Asia?
    22. Re:Needed? by LuxFX · · Score: 1

      Yes, but books make for better bedtime reading than websites. 1. the laptop gets *really* hot, and 2. I don't care if I fall asleep and a book falls off the bed.

      --
      Punctanym: alternate spelling of words using punctuation or numerals in place of some or all of its letters; see 'leet'
    23. Re:Needed? by gyratedotorg · · Score: 1

      The online docs do not say HOW to program in PHP.

      sure it does: http://www.php.net/manual/en/tutorial.php

      this is more than adequate for anyone with a basic knowledge of computer programming.

      --
      Gyrate Dot Org - "Where high-tech meets low-life"
    24. Re:Needed? by Trejkaz · · Score: 2, Insightful

      So basically you fill the first half of the book with a bloated version of the instructions that are already on the web site. Then you fill the second half with a printout of the function library off the web site. Then you just need to put a bit of padding around it all describing a language which isn't even complete yet.

      This sounds worse than the typical Java book scenario, where they fill half the book with dry and obvious instruction, and the second half of the book with the Javadoc printouts. In defense of the Java book authors, the actual web documentation for some of those technologies is very scarce, but this is certainly not the case for PHP!

      --
      Karma: It's all a bunch of tree-huggin' hippy crap!
    25. Re:Needed? by larry+bagina · · Score: 1
      Great. Too bad php5 isn't final yet. And don't forget about the new functions, extra function parameters and deprecated functions with every point release.

      --
      Do you even lift?

      These aren't the 'roids you're looking for.

    26. Re:Needed? by larry+bagina · · Score: 1
      Similarly, a book is easier on the eyes, very portable, well-indexed, has a consistent format and quality and probably has been better-edited.

      I don't know... CmdrTaco, Hemos, Timothy, etc. are all "editors".

      --
      Do you even lift?

      These aren't the 'roids you're looking for.

    27. Re:Needed? by bytesplit · · Score: 0

      Because, numbskull, there are quite a few folks who actually get tired of looking at a monitor. Unlike Linux zealots like you, who couldn't figure your way out of a paper bag, let alone out of your cold, dark basement, people actually have lives. I don't know, like taking care of children, working, etc? Therefore, it reasons to stand that maybe purchasing a book would be cheaper than printing out the stuff from the web, and healthier than sitting in front of a screen hours on end. You figure it out.

      --
      real geeks hate soap operas.
  2. What? by Jorkapp · · Score: 1, Funny

    No PHP sticker from ThinkGeek inside? C'mon! Theres gotta be some incentive to buy it, instead of printing the online stuff.

    --
    Frink: Nice try floyd, but you were designed for scrubbing, and scrubbing is what you shall do.
    1. Re:What? by arcanumas · · Score: 2, Funny
      main()
      {
      printf("Jorkapp is a programmer");
      main();
      }

      Jorkapp is a programmer who does not know that this will eventually core dump because it will fill the stack.

      --
      Slashdot Sig. version 0.1alpha. Use at your own risk.
    2. Re:What? by Anonymous Coward · · Score: 0

      some programmer you are jorkapp... the output from your sig would be Jorkapp is a programmerJorkapp is a programmerJorkapp is a programmerJorkapp is a programmerJorkapp is a programmerJorkapp is a programmerJorkapp is a programmer

      throw a \n in there, then it will look like
      Jorkapp is a programmer
      Jorkapp is a programmer
      Jorkapp is a programmer
      Jorkapp is a programmer

      much better.

    3. Re:What? by mkirsch · · Score: 1

      Jorkapp is a programmer Jorkapp is a programmer Jorkapp is a programmer Jorkapp is a programmer ... and then it will crash.

  3. Re:Needed? (Obligatory reply) by October_30th · · Score: 5, Insightful
    Online documentation is also ugly and hard to read.

    I always print out the manuals, faqs and howtos I read frequently. I also print out important e-mails.

    --
    The owls are not what they seem
  4. The online PHP documentation could be improved by Anonymous Coward · · Score: 1, Informative

    There is no general alphabetical function list, and even in the function categories the listings aren't always in alphabetic order.

    1. Re:The online PHP documentation could be improved by Crewd · · Score: 4, Informative

      You mean there isn't a page like this one?

      http://php.net/quickref.php

    2. Re:The online PHP documentation could be improved by Anonymous Coward · · Score: 1, Insightful

      That's not part of the "standard" documentation distribution (check the tarball). I like to have a local copy of the docs so I'm not hitting php.net constantly (and I program PHP for living).

    3. Re:The online PHP documentation could be improved by Anonymous Coward · · Score: 0

      You must tell me where you work. I need to escape this boring C/Open GL crap I do now. PHP for a living would be so much nicer.

    4. Re:The online PHP documentation could be improved by dark_panda · · Score: 3, Informative

      I'd suggest taking a look at this page:

      http://www.php.net/mirroring.php

      I've set up a mirror for internal use at work. Just run rsync in a cron job every week or month or whatever to keep things up to date.

      J

    5. Re:The online PHP documentation could be improved by Anonymous Coward · · Score: 0

      Yeah. I always thought about quitting hardware development and getting into the exciting world of web monkeydom. Working close to the idiot websurfer is what I always wanted. That guy must be proud.

    6. Re:The online PHP documentation could be improved by Anonymous Coward · · Score: 0

      How proud you must be, to make a sarcastic comment such as this!

      There are many worse things in life than to be paid to program PHP...many many worse things. Working with your overbearing ass is probably one of them.

    7. Re:The online PHP documentation could be improved by Anonymous Coward · · Score: 0

      I'd rather flip burgers and go back to college instead of making a living off PHP. Seriously, in 20 years, can you look back and say "all I've done is writing stupid web pages in PHP" without starting to cry?

    8. Re:The online PHP documentation could be improved by Anonymous Coward · · Score: 0

      Making a crapload of money for 20 years without doing any real work? Hell fucking yeah I could look back in 20 years and gloat at all the stupid mofos like you who busted their balls for their cash. Enjoy your burgers. Don't forget to ask if they want fries with that, ass monkey.

    9. Re:The online PHP documentation could be improved by Anonymous Coward · · Score: 0

      they just want a fancy-ass webpage to tell people dynamically how many times their dog took a crap in the past hour. And are willing to pay absurd amounts of money for someone to do it for them.

      Dude, that's so 90s... do a reality check when you have the time. Web "development" is done by the failures who couldn't find something better to do after college (or didn't have the skills). And by Indians, of course. Where I live, the people doing it hardly earn more than a xerox repairman.

      They get pathetic when they try and haggle down the price on a rustbucket

      We don't drive rustbuckets here in Europe. We drive nice BMWs and Mercs.

    10. Re:The online PHP documentation could be improved by SvendTofte · · Score: 4, Informative

      Also, when you want the lowdown on a function, it's super easy to just enter

      www.php.net/functionname

      into your browser, and you're forwarded straight to the functions documentation, and usually also the local mirror. Sweet stuff.

  5. Is this really the right thing? by rastakid · · Score: 1

    Toward the beginning of the book they have a great deal of light, explanatory material as they cover the basics of PHP. As they move towards more advanced topics there is less explanation and a tighter packing of information.

    Hmm.. shouldn't that be the other way 'round? I mean, I prefer to have the easy (self-speaking) topics with a tighter packing of information and less explanation than the hard topics, where I could use all help.

  6. Re:Core? by Anonymous Coward · · Score: 0

    Wow...been a while since I've seen a TA reference that didn't really mean to include a '&' inbetween.

    Offtopic but vaguely amusing.

  7. I gotta go with PHP CookBook by bc90021 · · Score: 2, Informative

    No, I'm not selling, but here is a link at O'Reilly's website.

    If you know PHP to a certain degree, this book is very useful, and presents real world examples. It is very up to date, and even covers things like PHP OOP and PEAR.

  8. Core PHP Programming by ravenswood1000 · · Score: 1

    It really is a great book. I have both 2 and 3 editions. Yea, you can use the online PHP help, but this book is a must have for the serious programmer. I guess I'm one of those that like to have dead trees in front of me with lots of little tags hanging out the end.

    1. Re:Core PHP Programming by neowolf · · Score: 1

      I've had a first edition for the last few years. It is the most-used reference book I have. It is full of dog-eared pages and Post-It note tabs. Most of the pages aren't even held by the binding anymore (it has almost reached the point of not being a "book" anymore), and over the years I've written in revisions to many of the functions that have occurred since it was first published. The online docs are excellent, but it is just more convenient (and often FASTER) to flip through a book on my desk to look up a seldom-used function than to look it up online.

    2. Re:Core PHP Programming by dave420 · · Score: 1

      This is a true question - I'm not being funny. What do you use it for? I've been coding PHP since '99 and everything I've ever needed to look up was online.

    3. Re:Core PHP Programming by Anonymous Coward · · Score: 0

      I also agree that this is a great, if not the best, PHP book available. I have the 2nd edition and immediatly bought the 3 edition when it hit the shelves. A great book on programing practices in general and the best PHP coding and reference book I've ever read.

  9. When PHP looks like an appealing language... by krog · · Score: 1, Funny

    ...you know you've been looking at FORTRAN too long.

    God, I feel like this code was carved into stone tablets.

  10. Incomplete PHP5 by TekZen · · Score: 4, Insightful

    I was very excited to get a book that covers PHP5. However, since PHP5 is still changing the book leaves a lot to be desired. There is no information at all on SimpleXML, which will probably be the prefered XML handler once PHP5 is released. When I bought the book I was expecting it to be one of those books that gets worn out from use. However, I haven't touched it in over a month (and I probably bought it 6 weeks ago). I would wait to buy books on PHP5 until PHP5 is out. -Jackson

  11. PHP books *are* needed, just not all of them by mgkimsal2 · · Score: 4, Insightful

    There's a lot of people who say 'you don't need a book, the online docs are great!'. I disagree.

    *Some* books are good (although I think there are too many which repeat the same information, not enough focus on particular topics in the PHP world) and necessary because they can go into greater detail than you get from the online docs.

    "What about online tutorials?" Some are good, but having it all in one book, written by only one or two authors (as opposed to wrox-style 15 authors) can help keep a consistent presentation of concepts from beginning to end.

    I'm not saying online sucks and all books are great - many PHP books aren't all much more useful than the online docs really. But for those that try to actually teach, rather than reprocess, I think they can be more valuable over time than *just* the online docs.

    Personally, I think this 3rd edition is good, although there is, imo, too much reprocessing of the manual. You could cut 200-300 pages out of this book and not miss much of anything. What would be left is worthwhile, though. What's missing in all the reference material is details on what, if any, differences there are between PHP4 and PHP5. If it's there it's in text form, not a standard icon set to alert you of potential differences.

    BTW, I have roughly the same arguments for PHP training courses, which we teach (subtle plug). "It's all online!" isn't the best answer for everyone. Many people struggle for hours or days with some concepts with only tutorials and reference pages. Put them in a classroom where they can get immediate feedback on new concepts, and they get it much quicker. Each person learns and adapts to new information in different ways, and classroom training is appropriate for some people, whether it's "only" PHP or something else.

    1. Re:PHP books *are* needed, just not all of them by X-Nc · · Score: 1

      What would you say were some of the books that are good to have? I have various versions of older books on php (even one of the wrox books and, yes, it's not exactlly the one to use if you need any kind of continuaty) but am always interested in keeping up with things.

      --
      --
      If I actually could spell I'd have spelled it right in the first place.
    2. Re:PHP books *are* needed, just not all of them by mgkimsal2 · · Score: 4, Informative

      The developer cookbook, because of the 'recipe' approach (identify problem, discuss it, show solution).

      There's an older NewRiders book by, argh, lost the name - blue/purplish spine, something like "Web Application Development with PHP". One of the first books I saw on PHP where they went into advanced concepts, and didn't treat the reader as if they knew no programming. You were walked through various business problems and shown how they were addressed, and IIRC chapters built on earlier chapters for continuity.

      Some WROX are OK, but it's hit and miss.

      Haven't read the new Schlossnagle book yet, but it looks good too (likely more internal, gutsy type stuff not just 'here's a variable' kind of thing).

      HTH

    3. Re:PHP books *are* needed, just not all of them by pacman+on+prozac · · Score: 1

      What you're trying to say is if you're 'learning programming', books are invaluable.

      If you're just 'learning PHP' (ie from another language before) then the online manual is plenty.

      Having been a fulltime developer using PHP for a while I'd say that the one major thing with PHP, the main reason why the PHP online manual should be used over books, that doesn't apply so much to perl/java/tcl etc. PHP breaks major functions in minor version increments, you may think I'm trolling but its the truth. One good example is the passing of objects by reference, another is register globals if you want to go back that far.

      Basically PHP is likely to change in large ways, if your PHP knowledge comes from a 6 month old book don't expect it to be anywhere near complete. Its all relative though, if you're just learning for the sake of making your own homepage then its not a problem. Anyone doing development even semi-seriously using PHP needs to be checking out the manual rather than books, although as you state books are often a great compliment to the manual depending on the individual.

    4. Re:PHP books *are* needed, just not all of them by mgkimsal2 · · Score: 2, Interesting

      You're correct on the breaking stuff. What our problem has been is that generally the stuff that breaks doesn't even make it into the online manual. I'm still peeved at the way most changes are handled in PHP - they seem to have no concept of the fact that *millions* of people are affected by their actions, and carry on as if they were just hacking in their basement.

    5. Re:PHP books *are* needed, just not all of them by pacman+on+prozac · · Score: 1

      I'd have to agree I've found a few problems that I end up unsure if its a language issue or an fault with the way I do things.

      It seems to me that these issues seem to crop up less and less as time goes on, hopefully thats all part of PHP maturing and we won't see that kinda problem again..... *crosses fingers*

    6. Re:PHP books *are* needed, just not all of them by andy@petdance.com · · Score: 1
      Some WROX are OK

      Remember that Wrox is out of business. They sold off their titles to a number of different publishers who have since repackaged them under new imprints. Same thing with Coriolis.

  12. Namespaces by Anonymous Coward · · Score: 3, Informative

    I've had this book for awhile, and I do agree that it is on the whole a nice book -- being in its third reprint one has to expect that. However, the book doesn't really cover PHP 5 at all. None of the new extensions such as simplexml, sqlite are discussed (just the Zend Engine 2 stuff). On top of that, the ZE2 stuff is even outdated as it talks about things like Namespaces which were removed from PHP 5.

  13. Hate it when that happens by djupedal · · Score: 1
    is the pull between information density and a light, easily read style.

    Studies have shown that IDP occurs in only two dimensions, and is reliably influenced by other periodicals within a distance approaching three meters.

    Researchers where able, as an example, to block the IDP of a Sears Craftsman Tool Catalog with the July 1999 issue of Playboy Magazine.

    In turn, an unabridged copy of War/Peace required two copies of Lady Chatterley's Lover before the IDP succumbed.

  14. I have a soft spot for PHP... by D-Cypell · · Score: 2, Insightful

    Although ive not done too much with it, PHP seems to be fast becomming the de-facto standard for young programmers getting into true dynamic web development on the server.

    Personally I feel that J2EE and JSP is a more 'enterprise' technology for this kind of development with large transactional systems but the nature of PHP tends to lend itself more to the lightweight, free web development and is supported by a growing number of hosting companies (even free hosting companies).

    I do question the need for yet another book on the subject, but i prefer to see up to date copies of books such as this hitting the shelves than "1001 ways to do everything you need with .net".

    Kudos to the PHP team.

    1. Re:I have a soft spot for PHP... by mortonda · · Score: 1

      Maybe I just have never been exposed to "enterprise" programming, but could you elaborate on why J2EE and JSP would be better for the enterprise? What do they do that php doesn't? I've heard this before, but I have not seen any solid examples. :/

    2. Re:I have a soft spot for PHP... by scrytch · · Score: 1

      > Maybe I just have never been exposed to "enterprise" programming, but could you elaborate on why J2EE and JSP would be better for the enterprise? What do they do that php doesn't? I've heard this before, but I have not seen any solid examples.

      Get a session to migrate across a cluster in PHP, without roundtripping to a DBMS like mysql. Non-trivial problem, even J2EE containers often don't get it right (far as I know ASP.NET doesn't even try, but that's another story).

      Got an app that causes a fatal library error in PHP because of a syntax error in an include? It'll die. Silently. At runtime, i.e. when your customer is using it.

      I'm actually NOT a J2EE or even an "enterprise architecture" booster, but a great strength of J2EE is that you can do a lot of stuff "declaratively", i.e. write your app logic, then have it run in a "context" that fits your needs, so you can take your application that writes persistent data and plug it into your data persister using mechanisms like container managed persistence, and you can switch backends effortlessly. If you want to say that "using these objects means that you're in a transaction, and if anything dies, roll back any changes in the db", you can do that without any code. That means you won't make any mistakes in the code, leave something out that leaves stale data, because you're not worrying about it in your code in the first place. Same goes for security -- though I'll be the first to say that the default security model in J2EE is downright anemic, and form-based auth is a hack, and if they looked at FastCGI, they would have seen a reasonable way to do it.

      I'm sure others will come out with other reasons, but those are mine. Using J2EE is like driving a peterbilt, you don't really want to drive it to the store to pick up groceries (tho using resin+jikes+xdoclet makes it almost like scripting just with yucky syntax), but if you want to move the store's whole inventory, you're going to be glad for the backup power on the industrial refrigeration unit you got installed in that there trailer.

      --
      I've finally had it: until slashdot gets article moderation, I am not coming back.
    3. Re:I have a soft spot for PHP... by dave420 · · Score: 1
      I think you misunderestimated what he's saying... He's not saying PHP is unsuitable for enterprise work, just that J2EE/JSP aren't suitable for small websites ;)

      PHP can do everything. We all know that. That's not being disputed. ;)

    4. Re:I have a soft spot for PHP... by D-Cypell · · Score: 1

      I simply mean that PHP is simply not designed to deal with the kind of issues that present themselves in large-scale web apps.

      Firstly it is purely a web-development language, analogous to the JSP aspect of the J2EE, of the ASP.net aspect of .net.

      J2EE (and to a lesser extend .net) do much that PHP doesnt. There is a comprehensive set of API for managing common problems such as two-phase commit over 2 databases and a messaging system. I am willing to be that PHP doesnt do that very easily, and if it does, it probably shouldnt, just as you should attempt this kind of task from within scriptlets in a JSP page.

      Providing a full list of J2EE services and API's would not be practical and would be hugely off-topic.

      I am simply saying that PHP fills the niche of a simple, quick, free dynamic web-site development platform and I applaud it for this.

    5. Re:I have a soft spot for PHP... by Anonymous Coward · · Score: 0

      >Get a session to migrate across a cluster in PHP, without roundtripping to a DBMS like mysql. Non-trivial problem, even J2EE containers often don't get it right (far as I know ASP.NET doesn't even try, but that's another story).

      That is a design issue not a language issue.

      >Got an app that causes a fatal library error in PHP because of a syntax error in an include? It'll die. Silently. At runtime, i.e. when your customer is using it.

      This is a testing issue. ASP.NET does the same thing. Oracle transactions silently die when I have sql errors.

      I just don't get the "php is not enterpriese ready" crowd. The php engine is written in C, that is like saying that C is not enterprise ready or that apps written in C are not enterprise ready. Complete BS.

    6. Re:I have a soft spot for PHP... by mgkimsal2 · · Score: 1

      Got an app that causes a fatal library error in PHP because of a syntax error in an include? It'll die. Silently. At runtime, i.e. when your customer is using it.

      This is a design issue, not a PHP issue. With a proper controller system (not part of PHP, but can be designed in PHP with things like LogiCreate) this is simply not true. Use a user-defined function to do the includes and have it trap the error, or dig deeper into error-handling in PHP.

      This is the result of lazy or unclued-in thinking on the part of a PHP programmer, not PHP itself. While I wish PHP provided better ways of handling this directly, it's certainly possible to put together good design in PHP to handle things like this.

  15. Re:Needed? (Obligatory reply) by Frymaster · · Score: 5, Insightful
    Online documentation is also ugly and hard to read.

    yes, but....

    1. it is always up-to-date
    2. it is complete, ie it archives older versions and deprecated calls
    3. it has user comments usually (php.net's user comments have saved my ass at least twice)
    4. it is free
    5. it weighs nothing. when you walk to work, this counts.
  16. good book by Anonymous Coward · · Score: 0

    If you're after a book that more than adequately explains the power and nuances of PHP and programming in the language then this is a marvelous volume.

  17. Re:Core? by Anonymous Coward · · Score: 0

    Ahh... Total Annihilation. Now there was a game that was already years ahead of its time when it came out.

  18. PHP Cookbook from O'Reilly by Anonymous Coward · · Score: 5, Interesting

    I gotta agree with the poster above.. O'Reilly's PHP Cookbook is an excellent way to sharpen your PHP skills.

    I've recently gotten back into using PHP for medium-size sites, after a brief period of hating it. I hated the security problems, the "fake" OO, the arbitrary stuff like magic quotes, the procedural functions. However, I've changed my opinion a bit: in security, you can have the PHP engine OFF and very tight in the .ini, and then make adjustments in the httpd.conf for each customer. I.e., just let them open files in their own directories. And the OO is simple but effective enough for clear maintainable code. Throw in a PHP accellerator and you've got a great environment.

    PEAR (object-oriented extension library) is pretty cool. If you've never used it, try it out: "wget -O- http://go-pear.org/ | php -q".

    And PHP5 looks great, I love the fact that it has exceptions, interfaces, and type hints, that will pretty much kill Java on the medium/small end of the scale. So I decided to start using PHP again.

    Anyway, the only good book I've seen is the O'Reilly Cookbook. They totally missed the PHP bandwagon but they redeem themselves with this one. It's clearly written, very thorough, and includes recipes of all levels. I learned a lot about PHP just by reading through the recipes. They usually present one clear way to do everything, plus make some useful discussion on performance and security when appropriate. The authors cleary understand PHP deeply.

    And the book is pragmatic, unpretentious, and clearly designed to help you get your work done, rather than present a list of "my language is cooler than yours" tricks. Unlike certain others *cough* Python cookbook *cough*. (Granted, that's also a property of PHP itself).

    So if you've got the basics of PHP (which you can glean from the PHP web site or from studying other people's code), try the O'Reilly book. It's probably the only one you'll need until PHP5 comes out.

  19. OH LORDY!!! by Anonymous Coward · · Score: 0

    S'n on my B U B!

  20. Re:Pirst Fost by Anonymous Coward · · Score: 0

    problem is: nobody knows

  21. Re:Needed? (Obligatory reply) by Anonymous Coward · · Score: 0

    Doesn't PHP documentation actually have a whole bunch of skins for it? Plus it has the notes and comments from other users which is often very handy. I don't have this book but I do have the PHP and MySQL book and it hasn't moved from my shelf since I downloaded a copy of the documentation.

  22. Re:OMG TYLER EAVES = PWNED BY AC FP!!~`1` by Anonymous Coward · · Score: 0

    Where's the lol? There's supposed to be a lol in there.

  23. Sure, and that's all fine, by Anonymous Coward · · Score: 0

    just sometimes a print copy of something is just as convienent (I can't use my laptop for long on an airplane or really want to on a bus). If the PHP crew could clean up some of the nits I have with their docs (including better example code) then I'd be perfectly happy with what is online.

  24. books great for preparation... by tertullian · · Score: 1

    When I started writing PHP apps I bought my share of books. It was great reading material when I was in the, well you know...

    When on the train going to and from work, it served as great reading material.

    When on vacation, it was great reading material.

    What does all that accomplish? Well it prepared me to better understand the online documentation when I needed to use it. Now, I easily go to php.net in order to remember what arguments or how many a function takes, etc...

    In my opinion, this is the best PHP book out there right now...

    --
    Goal in Life: Learn as much as I can...
    1. Re:books great for preparation... by Raven42rac · · Score: 2, Interesting

      Four words. O'Reilly Pocket PHP Reference. This sounds like your kind of book then. It comes in terribly handy, it has a place right next to my Obj-C pocket reference.

      --
      I hate sigs.
    2. Re:books great for preparation... by tertullian · · Score: 1

      Well, what I started to was download available documenation onto my laptop. Since I'm always on it, I just fire up a browser and browse the docs...

      --
      Goal in Life: Learn as much as I can...
    3. Re:books great for preparation... by Anonymous Coward · · Score: 0
      When on vacation, it was great reading material.


      Man! I really hope you are talking like in the car or on the plane, not on the beach or by the pool!!

  25. Save $$$, buy it used! by TrollBridge · · Score: 0, Troll

    Patent nonsense aside, Amazon has it's uses once in awhile. Don't want to pay full price? Buy it used!

    --
    There's a Mercedes gap too. I want one and can't afford one, but it's not government's job to do anything about it.
  26. Re:Sorry, but this is fucking stupid. by Anonymous Coward · · Score: 0

    Woah, that's such a rant - you've fitted in:

    Perl hatred
    C hatred
    Style
    Slashdot hatred
    Slashdot Gates hatred hatred
    K&R hatred
    Larry Wall hatred
    Cobol, Lisp and Fortran love (a computer without cobol is like a cake without mustard)
    You've even fitted in Beagle 2.

    Sir, I salute you, not least because of the rant you're probably going to post in reply to this.

    To get over your hatred, I suggest relaxing, perhaps switch to tea instead of coffee. Spend some more time with your family or signficant other.

    (I actually rather like most of your posts, just you seem so angry lately. Chill a bit, please.)

    Thank you,

    Friendly local AC.

  27. WARNING! GOATSE TROLL! by cyt0plas · · Score: 0, Offtopic

    WARNING! GOATSE TROLL!

    --
    Contact Me (got tired of viruses emailing me).
  28. Re:OMG TYLER EAVES = TeH Ghey! by Anonymous Coward · · Score: 0

    I durn beat him down like a sheep bitch! Yee-haw, I's got mah furst postin on that intar-webbie thingie! Mah kin wood shore be prowd!

    Naw, I dun din dinn't get the first post. I's lying through mah tooth!

    But Tyler Eaves dun got beat down like a bitch, dinne?

  29. Re:1041 pages of PHP? by Anonymous Coward · · Score: 0

    No shit, just like those mouth-breathers that sign their .sig twice on emails or message board posts. They should have their computers siezed by the FBI for the good of all americans.

  30. Re:1041 pages of PHP? by Anonymous Coward · · Score: 0
    If the asshat designing a corporate website doesn't know what a variable, function, statement, [etc] is then they shouldn't be employed.

    And if they're using PHP to do it, they shouldn't have a license to breed anyway. That's like choosing a Craftsman 14mm hex wrench, because it's a good tool, and then proceeding to castrate yourself with it.

  31. Re:Sorry, but this is fucking stupid. by Anonymous Coward · · Score: 0

    Yes, I demand that Unix be re-written in Lisp. PRONTO!

  32. Re:Needed? (Obligatory reply) by Anonymous Coward · · Score: 0

    Hahahaha. Is that sarcasm? I sure hope so.

  33. Real programmers only write in... by Saeed+al-Sahaf · · Score: 3, Insightful
    "Real programmers only write in..."

    ...the language most appropriate for the particular project?

    --
    "Who are in control, they are not in control of anything - they don't even control themselves!" - Glen Beck
  34. Re:Needed? (Obligatory reply) by bwalling · · Score: 1

    Online documentation is also ugly and hard to read.

    The documentation on php.net is leaps and bounds better than the documentation on any other website I've found. The user comments are very helpful - quite often, my question is answered by one or more of the comments.

    I also print out important e-mails.

    You must work at my company, printing email seems to be popular here. Print it out, file it in a drawer. I just don't get it.

  35. wow... by twoslice · · Score: 1
    Looks like somebody else got screwed with this book too...

    I agree with the parent - One big paper weight...

    --

    From excellent karma to terible karma with a single +5 funny post...
  36. Might as well start learning PHP by tekiegreg · · Score: 1

    Granted IIS is losing it and it would be nice to have another language in my tool belt anyways. I guess I should quit the MS evil developer camp and pick up a *nix based language or 2...

    It appears that this book is a good place to start, but anyone have any good intro to PHP book ideas for someone coming fresh out of the MS Camp? Also starting PHP tips and similar experiences appreciated :-)

    --
    ...in bed
    1. Re:Might as well start learning PHP by slappyjack · · Score: 1

      I used the previous edition of this book when i was learning php. I enjoyed using it, as It was laid out sort of like the Camel book was for Perl.

      I, also was heavily developing sites in the IIS/ASP world and had very little trouble wrapping my head around PHP. In fact, I actually found myself wishing ASP had all the goodies in it PHP does for ttaking care of "everyday" tasks.

    2. Re:Might as well start learning PHP by autechre · · Score: 1

      I started out with some Webmonkey tutorial on a simple use of MySQL with PHP. I wouldn't actually recommend whatever particular tutorial I used, as it had some bad practices (and I prefer PostgreSQL anyway). But after that, it was pretty much all right out of the online PHP manual. Often, I will reference their section on Perl-compatible regular expressions even when I'm writing them for a different language.

      Of course, if you want to learn this way, you have to have a project that you want to do. That's never been a problem for me, so I can't really point you in the direction of something that will make up "homework" for you.

      I have also checked out phpbuilder.com for hints at times. The Force-Type trick is one that I picked up there (although that's really more of an Apache thing than a PHP thing, PHP helps you to make good use of it).

      --
      WMBC freeform/independent online radio.
    3. Re:Might as well start learning PHP by Anonymous Coward · · Score: 0

      When I first started out, I enjoyed Web Application Development with PHP 4.0 on New Riders (somebody mentioned this before). It is a book that has lots of 'reading' but not a lot of coding examples.

      However, a question I have in general to all is, if you really want to take advantage of what the Unix/unix-like world has to offer, why not learn Perl first instead of PHP? You can get a grasp of a language that can do more than web development as well.

      I understand Perl is not the easiest of languages to learn. PHP does have practically all the tools and resources you need for most web development.

      Also, I'd recommend a book on mySQL if you want to do open-source applications. Heck, maybe a book on LAMP would be a good introduction (Linux, Apache, mySQL, PHP/Perl)

      Jerome

  37. Re:Needed? (Obligatory reply) by saberworks · · Score: 1

    Have you ever looked at the online documentation for PHP? It's gotta be the best docs ever. They have code examples, in-depth discussion of each argument, and user comments at the bottom. Everything is nicely formatted and the information is very easy to get to. After reading Core PHP Programming, I can also state with absolute accuracy that the PHP manual is far easier to read and navigate than their "function reference" section. I think the book should be half the price and should not contain the function reference.

  38. Great for Beginners and Pros by whitelabrat · · Score: 2, Interesting

    I pretty much started out my programming career on the hot-off-the-press Core PHP book. The online documentation is good as a reference, but for someone getting started Core PHP is well balanced enough so the reader doesn't get crushed by details.

    Wore my book out...

  39. Technical Writing by JediDan · · Score: 5, Insightful

    "One of my key concerns when reviewing a good book is the pull between information density and a light, easily read style. I believe that as we get further along the learning curve we can sacrifice some readability for density -- we want more facts and less explanation."

    You've just described some of the basics of good technical writing. The basic theory of writing good technical documentation is identifying your audience and writing so not only does the document answer the audience's questions and provide usefully comprehensible information, but also refers the more literate and technical readers to more detailed sources.

    Anyone aspiring to be a writer - either professional or just notating code - should take a few technical writing classes. There's an industry that's refined the process of technical writing and there's no sense to reinvent the printing press - so to speak.

    --
    - Dan
  40. With PHP5, why not use Perl? by waxmop · · Score: 3, Interesting
    PHP appealed to a lot of people because it was very simple and had limited syntax and didn't implement a lot of complicated data types. PHP was the kind of thing a non-programmer could learn in an afternoon. You didn't need to explain regular expressions, object-oriented design, or pointers/references. PHP originally just had loops, conditional statements, simple functions, and include statements.

    But every version has added on more features. Now instead of a smooth and light templating language, people are now writing templating languages to be parsed by PHP. Gahh! The proper response to all the trolls that insult PHP by saying that it isn't a real language is not "Wait until version 5! It supports class introspection!" Instead, the PHP community should have said that PHP wasn't meant to be a "real" language.

    Now that PHP requires a 1000-page book, why should it exist? Why not use Perl, or Python, or C?

    I will say that the PHP community is a very friendly and helpful group of people. Perhaps that is because so many PHP developers were previously graphic designers, and so they still remember how daunting programming can be to learn.

    1. Re:With PHP5, why not use Perl? by SmallFurryCreature · · Score: 4, Insightful
      Simple.

      Perl is a great tool. But it is more of tool to use on files then a tool to create webpages. Using perl to generate html or rather bits of html is like using a fully loaded factory workshop to hammer in a nail. Overkill.

      Python. No idea.

      C? You gotta be kidding. Compiling each time you make a change to page? C would be like using nanotech to create a new material from wich you can cast a hammer to insert a thumbtack. Overkill doesn't even begin to describe it.

      PHP may have gotten big but at its heart it still does the same what it did originally. Make dynamic websites. Sure you can mess with OO a bit and a lot more in 5 but if you don't want you never need to touch it. You don't need to access any database. You don't need to use shared memory to store variables. But you can if you want to.

      Perl is often used but approaches it from the other side. Great toolset with web added on. PHP is web with a great toolset added on.

      Of course real web developers know both.

      --

      MMO Quests are like orgasms:

      You may solo them, I prefer them in a group.

    2. Re:With PHP5, why not use Perl? by monique · · Score: 4, Insightful

      I disagree. Coldfusion is the kind of thing a non-programmer can learn quickly.

      PHP has always looked too much like shell scripting or C to be friendly to non-programmers. I love PHP precisely because it is extremely easy for a *programmer* to pick up, but has a lot of functionality with which you can improve your naive first implementation.

      My first PHP programs involved lots of calls to external apps, particularly grep and find. That ability allowed me, as a unix-tool-using programmer, to quickly hack together PHP that I could later improve. But I can't imagine picking up PHP as a non-programmer and having the first clue how to use it.

      --
      -monique
    3. Re:With PHP5, why not use Perl? by Anonymous Coward · · Score: 0

      That is the only thing I don't like about PHP, thrid party templating solutions. PHP itself makes is a templating language. I easily build simple classes and have all my logic as seperated from my display as best I can with out resorting to junk like asp.net codebehind and asp.net controls (yea lets let the scripting engine take care of the templating).

    4. Re:With PHP5, why not use Perl? by Christianfreak · · Score: 2, Insightful

      Perl is a great tool. But it is more of tool to use on files then a tool to create webpages. Using perl to generate html or rather bits of html is like using a fully loaded factory workshop to hammer in a nail. Overkill.

      Eh? With Perl you use what you need. Nothing beats CPAN. PEAR? not even close. And when you need something non-standard in PHP (graphics libraries?) You have to compile the whole thing again.

      Then there's all kinds of other things that you just can't do in PHP without rolling your own or trusting the latest snippet from php1337haX0rs.com. What do you do if you need to actually parse html? Use templating that a designer can understand? Even easily manipulate text data?

      PHP embeds scripting in webpages. Its rarely reusable and it often leads to a mess. Its also the kind of thing we used to flame Microsoft for (scriptable email?). Most other solutions sit outside your webpage (and can often even manipulate your webserver) to generate a page for you.

    5. Re:With PHP5, why not use Perl? by autechre · · Score: 1

      That's not quite fair. For most PHP extensions, if your OS provider has a sane package structure (e.g. Debian), you simply install more packages to add more support.

      The reason PHP has caught on is because it does what a lot of people need, and it's easy enough to learn. Of course, a good argument can be made that many people are writing "applications" in PHP that have no business doing so, and unchecked input has caused many posts on BUGTRAQ. But this seems to be just as much of a problem for other languages.

      I'm also not going to sit here and take comments about "often leads to a mess" from a Perl programmer :) Yes, mixing functionality and appearance can be bad, but you can write PHP so that this isn't a problem (much like you could write PHP so that register_globals wasn't a problem, but a lot of people just didn't).

      --
      WMBC freeform/independent online radio.
    6. Re:With PHP5, why not use Perl? by kryptkpr · · Score: 1

      Unless using mod_perl (which requires much more work on the side of the programmer), the overhead of starting a new perl interpreter for each request can easily bring a server to it's knees..PHP is readily available already built into the apaches at almost any ISP.

      --
      DJ kRYPT's Free MP3s!
    7. Re:With PHP5, why not use Perl? by Anonymous Coward · · Score: 0
      Eh? With Perl you use what you need. Nothing beats CPAN. PEAR? not even close. And when you need something non-standard in PHP (graphics libraries?) You have to compile the whole thing again.

      My experience with Perl may be somewhat limited, but I've had a far worse time getting CPAN to work than any recompile of PHP. Installing a module in CPAN once brought down the whole server. Everything. Granted, this was on old hardware, but still. How's that better?
      Then there's all kinds of other things that you just can't do in PHP without rolling your own or trusting the latest snippet from php1337haX0rs.com. What do you do if you need to actually parse html? Use templating that a designer can understand? Even easily manipulate text data?

      If you don't want to occasionally "roll your own", what are you doing programming? Your arguments are garbage anyway -- have you ever *used* PHP? "Easily manipulate text data"? Have you ever actually used *Perl*? You'd call that easy?
    8. Re:With PHP5, why not use Perl? by dsplat · · Score: 1

      C? You gotta be kidding. Compiling each time you make a change to page? C would be like using nanotech to create a new material from wich you can cast a hammer to insert a thumbtack. Overkill doesn't even begin to describe it.

      Actually, C or C++ is not completely wrong for generating web content. But your point defines exactly where to draw the line. If you are writing an engine that parses some special purpose templating language of your own, C/C++ may be the right way to go. Frankly, I'd lean toward Java for the task, but there can be good arguments either way. The key reason to do it is to access some C API to get at your data.

      I worked on something like this a couple years ago. We were putting a web interface into a server process that was written in C++. Adding the ability to handle HTTP & HTML for a limited range of requests was easiest by extending what was already there because it gave us access to all of the internal data structures. Doing anything else would have required building an interface that provided that access anyway.

      Ah, I love the smell of legacy systems in the morning.

      --
      The net will not be what we demand, but what we make it. Build it well.
    9. Re:With PHP5, why not use Perl? by moof1138 · · Score: 2, Insightful

      I am not a big fan of PHP, but there are good reasons why it has been successful where it is.

      1) A lot of people like to have code tags embedded in their HTML. You can do this in Perl with Mason, or EmbedPerl, or what have you, but good luck getting cheap hosting where you have that set up.

      2) Perl running through CGI has a lot of limitations, it is somewhat slow, you are limited in where you put scripts, etc. These are overcome by moving to mod_perl, but if you have a big server that is serving up a lot of domains as vhosts, which is what a lot of cheap hosting is about, they are not going to want to enable mod_perl, since every script will be sharing the same interpreter and this is not at all secure. I think I read that mod_perl 2 would help with the latter, but even if this is the case, since nobody runs Apache 2 it doesn't really matter.

      So PHP makes it easy to inline code which a lot of people like, especially beginners, and fits well for current hosting limitations.

      There also is the bad reason that there are a lot of crappy free CGIs out there, like the dreck on Matt's Scripts that are security nightmares so some admins have stomped on CGI access because of this. PHP has no advantage here, since there are plenty of PHP security nightmares out there, but the Perl ones have been around longer and been exploited longer, especially the evil 'formmail.pl'. Another PHP plus is that it is easier to sandbox off PHP for admins who have unknown users posting code on their servers.

      Personally I feel sorry for people stuck using PHP. I use mod_perl, DBI, and HTML::Template, and a few other really great CPAN modules, and when I get stuck going back to PHP to do work I find the tools very inconsistent and limited compared to Perl, especially in database programming. But if I were to set up a 'cheap webspace' server I would not trust users with Perl unless I worked hard to cripple it, while I could adequately cripple PHP fairly quickly.

      --

      Hyperbole is the worst thing ever.
    10. Re:With PHP5, why not use Perl? by onomatomania · · Score: 2, Insightful

      Yes, and PHP has had to pay a price for that simplicity that appeals to beginners. For example, take the whole "register globals" thing. Well, it sure sounds appealing to a beginner that every field in a form is automatically a variable with the same name in the global namespace. I mean, it's so easy to just say "print $name" or whatever, right? Oh, but wait: you have to meticuously scrub all user-supplied data, otherwise you leave yourself open to cross-site-scripting or SQL injection attacks. And if the user on the other end adds a field to the URL that you didn't think about beforehand, then you now have a new variable in your global namespace that you *may* not have been aware of. Is it really a good idea to expose the entire global namespace of your language to the end user? And yes, they changed the default for this a while ago, somewhere around 4.1 or so. But there are still some bad scripts out there that require it turned on. And there are still dozens and dozens (if not hundreds) of exploits that are still being discovered or are as-yet unpatched because of the lazyness introduced by the mantra of "Don't worry, I'll fill in all the variables for you. You just worry about sticking them in a SQL statement."

      And, until recently the entire language had a flat namespace. If you wanted to create a module to do something you just sort of picked a starting prefix for all your function names and hope that they don't collide with anything. This is surely fine when the language is young, and it must look rather appealing to the beginner -- as in, "Hey, neat, no worrying about all those complicated classes or scoping or namespaces or anything, I just have this extremely long list of functions that I can call." And that sort of organization really doesn't scale. It would not be able to support the 10,000 (or whatever) modules that CPAN offers for Perl. And as the number of PHP modules balloons they realized in 5.x that they needed much stronger class-like typing and organzation, instead of just having a long list of a bunch of functions.

      So, yes, PHP is terribly easy to learn... but that isn't necessarily good from the standpoint of security or long-term language health.

    11. Re:With PHP5, why not use Perl? by Anonymous Coward · · Score: 0

      My entire web interface is written in C. There is no reason to recompile each time you change a page; simply work from a static copy and apply the changes after you've finished.

      As another poster commented, C is very handy for accessing data stores with existing APIs.

    12. Re:With PHP5, why not use Perl? by Christianfreak · · Score: 1

      mod_perl requires you to code properly so yeah I guess that's more work for anyone who doens't do it in the first place. Its also much more flexable and has shown to be more scalable.

      I have no problem with ISP's installing PHP for users, its great for them and it can be made relatively safe. I'm a sysadmin and I have it installed for my users, but when I'm doing a serious project I much prefer Perl if I have a choice.

      And many ISPs and other sysadmins I'm familiar with run PHPs as CGI rather than as a part of apache for added security, so the speed issue can be a moot point.

    13. Re:With PHP5, why not use Perl? by kryptkpr · · Score: 1

      I'm not saying PHP should be used for everything, but if you gotta make a proof-of-concept page quickly, and don't have time for proper coding, PHP is a godsend..

      For serious projects, I agree that Perl is a much more powerful langauge for getting stuff done in.. In the past, I've done hybrid Perl/PHP sites, with Perl doing the dirty parsing work and stuffing results into a database, and a pretty, low-cpu-using PHP front-end for the users.

      This was back in the register_globals days mind you, and the reason I ended up doing it is because the site was originally entirely Perl and once we reached about 10,000 visitors a day the server a (P2-450 IIRC) began to crawl.. The load average hit 118 (that's not a typo.. 118!) so it took 3 minutes to even get a ssh login prompt, and something had to be done quick. There were 100+ zombie perl processes hanging around, it wasn't pretty. PHP saved my rear, brought the CPU usage way down to almost nothing, and scaled just fine up to about the 50,000 peak visitors a day the site got.

      --
      DJ kRYPT's Free MP3s!
    14. Re:With PHP5, why not use Perl? by Tidal+Flame · · Score: 1

      I agree totally. PHP is easy to learn if you're a programmer, but it's not the kind of thing a non-programmer can learn in an afternoon.

      My girlfriend is very smart and knows HTML. I tried teaching her PHP and it took days before she could do actually do anything with it. Okay, so I'm not the best teacher, but speaking from experience, PHP definitely isn't that easy.

    15. Re:With PHP5, why not use Perl? by Brother52 · · Score: 1

      Why not use Perl? Because competent Perl developers are scarce and expensive, and PHP ones are cheap and available. By "competent" I mean one that knows the platform well, regardless of their general capabilities as a programmer. The gains in development speed and product quality that the Perl platform offers only start to justify higher costs on large or non-trivial projects, which are a small minority.

      I was using PHP for four years, and was able to use it to its full potential in about 6 months, with just online docs and one book. About three years ago I moved to Perl, read four books on it, and I still often feel as a newbie. Nevertheless, I think this is the best decision I made in my career as a web developer.

  41. Re:Sorry, but this is fucking stupid. by Lordrashmi · · Score: 1

    That probably should have been marked as flamebait, but I decided to reply instead. I do agree on your point that "Good code is not about obfuscation gibberish or hax0ring. It's about reusability, stability and portability.". However, that being said, I do think that a language like PHP is great for a young programmer. When you first start programming, all you want to do is write something that works. I don't think anyone can say that the first thing they wrote was beautiful or reusable. Once they have been programming for a while they start to see all the stupid mistakes they have been making and fix them. Your argument is like saying there shouldn't be medical interns because they aren't neuro surgeons yes. Clearly there is a place for both. Writing crappy code then staying up all night fixing it is part of becoming a better programmer. You can right shitty code in any language, and you can right good code in ALMOST any language.

  42. JUST SAY NO! by Anonymous Coward · · Score: 0

    You shouldn't use PHP because future employers take a dim view of drug use.

  43. $39.95? by Yonder+Way · · Score: 1

    $31.49 (and free shipping).

    1. Re:$39.95? by LetterJ · · Score: 1

      And J's Law of Pedantism strikes again.

      In every conversation with a geek, there will be at least one who will completely miss the point only to point out insignificant descrepencies in the statement.

  44. Sounds familiar by tarquin_fim_bim · · Score: 2

    'I can't claim to have read every page or run all the code examples'

    Well I didn't read the article. But seriously though, what kind of review can you expect from a reviewer who can't be bothered to read the whole book?

  45. Re:1041 pages of PHP? by tomstdenis · · Score: 2, Interesting

    Not much wrong with PHP. That wasn't my point. It's just every jackass who copies the function reference guide for [language of the week] then tacks on 400 pages of "this is what an if statement is" does not a good book make.

    If you want to learn comp.sci there are better books then some jackass reference manual for a programing language.

    In reality you could put the PHP grammar on a few pages or so [the C one takes like 4-5 pages in the K&R book] then proceed to show off examples of PHP being used for practical purposes [e.g. accessing mysql, accepting files, etc, etc].

    Tom

    --
    Someday, I'll have a real sig.
  46. PHP in 24 hours 3rd edition does. by tolan-b · · Score: 2, Interesting

    It covers everything in the PHP5 spec up to about a month and a half ago I think. Had to have a peek inside though, because the cover says it covers 4.x, which is clearly a misprint because it's got all the new OO stuff, SQL Lite and simpleXML stuff in there.

    on amazon.

  47. Re:Sorry, but this is fucking stupid. by Anonymous Coward · · Score: 0

    There are better languages if all you want to do is write something that works. Python and Ruby, for two.

  48. Re:1041 pages of PHP? by proj_2501 · · Score: 1

    "Cuz really you don't need to teach how for loops work and all. If the asshat designing a corporate website doesn't know what a variable, function, statement, [etc] is then they shouldn't be employed."

    A corporate web designer's job SHOULD be to make the web site look nice and make it easily navigable. Code is not the first priority. Why pay for a code monkey AND a web monkey if you only need very basic code with a nice layout?

  49. While I'm all for learning.... by Chuck+Bucket · · Score: 1
    ...sometimes you can't from a book:

    "the book covers PHP5, but since PHP5 is still changing the book leaves a lot to be desired. There is no information at all on SimpleXML, which will probably be the prefered XML handler once PHP5 is released. When I bought the book I was expecting it to be one of those books that gets worn out from use. Personally I would wait to buy books on PHP5 until PHP5 is out.

    CB

  50. Re:Sorry, but this is fucking stupid. by Lordrashmi · · Score: 1

    I haven't worked with Ruby, but as far as Python goes, a new programmer shouldn't have to worry about whitespace. I agree that having proper whitespace makes code much easier to read and I wish some of the bastards in my group would format correctly, but for a new programmer it would be hell.

  51. Re:Needed? (Obligatory reply) by Bromrrrrr · · Score: 1

    The documentation on php.net is leaps and bounds better than the documentation on any other website I've found. The user comments are very helpful - quite often, my question is answered by one or more of the comments.

    Amen, three cheers for whoever maintains it, it's the best I've ever come across.

    Just for laughs compare it to the PostgreSQL docs where I believe most user contribute notes are about how lacking the documentation is :).

    --

    What a rotten party, have we run out of beer or something?
  52. Re:1041 pages of PHP? by tomstdenis · · Score: 1

    "Why pay for a code monkey AND a web monkey if you only need very basic code with a nice layout?"

    Because they're two different jobs? One person makes the art and the static HTML, the other programs the dynamic sections which are almost always the parts of a website that get exploited.

    By your logic the technical writers should code as well since they're dealing with the application too.

    --
    Someday, I'll have a real sig.
  53. teach you how to program? by Stone316 · · Score: 1

    Does a book on PHP really teach you how to program? I'm sure there are better, language independent resources/books that can 'teach' better.

    --
    "Thanks to the remote control I have the attention span of a gerbil."
    1. Re:teach you how to program? by RetroGeek · · Score: 1

      No argument there.

      Programming properly takes effort and requires knowledge in many areas (UI design, database design (normalizing data), security, ...). No one book or one course can give you this. Much knowledge is gained by doing (and failing) and having a mentor.

      Nothing scares me more than having a dept head say "but I can hire a co-op student". There is a reason they are still students....

      --

      - - - - - - - - - - -
      I am a programmer. I am paid to produce syntax not grammar. Deal with it.
  54. Re:Sorry, but this is fucking stupid. by anantherous+coward · · Score: 1

    I started programming years ago using FORTRAN on old IBM mainframes. An amusing trick on those machines was to pass an actual integer to a subroutine and redefine it. It would work. You could redefine "1" to be "2" and get rather curious results from later calculations. (This won't work with g77).

    Most FORTRAN code I had to work with was simply horrid -- huge common blocks and spaghetti code. Bad programming by engineers. Also, "buffer overflows" were possible in the langauge. If FORTAN were the lingua franca of the UNIX world instead of "C" (it was not capable of being so, but it if were), it would be just as full of holes and security issues as "C". Most large FORTRAN code bases are instable in their own way in that large FORTRAN programs crash regularly due to programming errors. The only reason you do not read about these kinds of problems with FORTRAN is because it is not used to write operating systems or user interfaces. FORTRAN crashes are not normally critical. Users learn to work around the errors.

    Regardless, I think you are right that there are better languages to teach young programmers. But -- PHP is already here, widely implemented and readily available for use in web pages. So teaching good PHP is a good idea. It is something like teaching sex education to teenagers. You want to emphasis abstinence (don't use PHP as your first languae -- learn programming in a better language), but if you do use PHP, here is how to do it . . . (I don't know that the reviewed book teaches good style or not, hopefully so. Yes, I do think that it is possible to develop a good style for any language in which you work.

  55. Good book but... by 2Wrongs · · Score: 4, Interesting
    I used this book as my intro to PHP (I've done several other languages). Overall the book was good, but I had some problems:

    1) I loved the objected oriented aspects, but was disheartened to learn most of that code only applies to the latest PHP, which isn't deployed in most ISPs.

    2) The index is terrible. Thank God the online docs are good. I've rarely been able to use the book as a reference.

    3) I'm probably being dense, but I had trouble finding the sample code online. I expected it on Prentice Hall's website or at least an obvious link. (It's on the author's site)

    I'm whining, but I really did like this book and would still recommend it.

  56. Re:Sorry, but this is fucking stupid. by hyperstation · · Score: 4, Insightful

    bs. a new programmer should have to worry about everything that is going to affect the readability of his code in the future when he's an advanced programmer.

    it's hard, very hard to break the bad habits instilled in "new" programmers. get em while they're young. that's why i like the fact that python *forces* good form and whitespace. just the notion that it won't work if it's not properly formatted will carry over to other languages when someone moves on to another language, and good style will as well.

    understanding the difference between tabs and spaces isn't something too hard for anyone attempting to learn a programming language to tackle.

    the parent is gonna get un-modded for this, but i just had to say something...

  57. Don't Dread It by repetty · · Score: 1

    Don't dread learning PHP. I applied myself to PHP last spring and, I have to say, it was refreshing and a damn lot of fun.

    --Richard

  58. Re:Sorry, but this is fucking stupid. by Laconian · · Score: 2, Interesting

    PHP seems to attract everybody under the sun--including horrible, horrible programmers. I've had to maintain PHP written by someone else before, and it wasn't pretty. Far from being pretty, it was some of the ugliest code I've ever seen. And when I looked for help on forums with certain problems I ran into, the responses I received were oftentimes truly amateur hackery.

    That's probably why PHP has a bad name. That and magic quotes.

  59. um by Anonymous Coward · · Score: 0

    why the fuck is there a sister machine gun slashbox?

  60. Re:Needed? (Obligatory reply) by Christianfreak · · Score: 2, Insightful

    The problem is number 3. If the documentation is so complete why are the user comments needed? There have been plenty of times I've seen things in user comments that should have been in the actual documentation. That doesn't seem very complete to me.

  61. Intermediate Learners by shapiros · · Score: 1

    What I think is needed are books (or a series of books) geared towards a person who is computer-savvy, is motivated, and wants someone to show them how the stuff is done, without having to go through the low-level beginner stuff. It seems like there are an absence of books that are out there for this group, which I happen to be in.

  62. Re:Sorry, but this is fucking stupid. by lewp · · Score: 1

    I think most people who complain about the Python whitespace thing haven't written a line of Python. I'd never used a language where whitespace was significant before, but I haven't had a problem yet that was whitespace-related.

    FWIW, though, Ruby is probably the closest thing out there to Python, but uses "end" keywords rather than whitespace to delimit blocks. If you absolutely refuse to use Python because of the whitespace thing, Ruby might be right up your alley.

    As far as a new programmer, who isn't biased against whitespace-significant languages from the start, I think the biggest danger with Python is that the programmer will become spoiled and not want to learn anything else.

    --
    Game... blouses.
  63. Thanks for the warning by Anonymous Coward · · Score: 0

    the book leaves a lot to be desired.

    The publishers were obviously trying to save money by not processing wood pulp to make the paper for the book.

    Using leaves for the pages is a red flag for a publisher cutting corners. Again, thanks for the warning!

  64. Re:Sorry, but this is fucking stupid. by Christianfreak · · Score: 1

    I think it has a bad name because things like magic quotes, lack of namespaces and a function_name_for_everything() make it feel like it was written with new programmers in mind.

  65. Better Prices than Amazon & BN by Anonymous Coward · · Score: 1, Informative

    Why does everyone settle for these two?

    Rely on 'bots: AddAll, BookPool

    http://tinyurl.com/2p85w

    http://tinyurl.com/ys56w (Our Price: $28.50)

    Including shipping, Walmart: 26.86

    Amazon: $31.49 + shipping

    BN: $35.99 + shipping

    BN: $34.19 + shipping (for BN members)

    For all of the Amazon-BN bigots, send me half of your savings, 'kay?

  66. Re:1041 pages of PHP? by proj_2501 · · Score: 1

    Not every company can afford to pay a web designer and a web developer.

    It's pretty cheap to give the web designer a book and say "read this", especially when there's no sensitive data on the line.

    Course, it's probably cheaper to pay some Indian folks to do it.

  67. 2nd edition is nice, too by sdibb · · Score: 1

    I have the second edition of this book, and I'm loving it. It's great as a reference to flip through sections when you know what you want to code, but can never remember the function name.

  68. It's hard to write books on dynamic languages by ftzdomino · · Score: 1

    PHP changes so often that it's a bad idea to own books on it. Best practices change from week to week. I would be happy if the zend team stopped introducing undocumented application breaking parsing changes into the most minor of upgrades. Frequent language changes are one of the biggest flaws of PHP.

    1. Re:It's hard to write books on dynamic languages by yuud · · Score: 1

      Perhaps frequent change can be considered a strength as well, but I do understand your frustration of having the ground shift under your feet, so to speak.

    2. Re:It's hard to write books on dynamic languages by Anonymous Coward · · Score: 0

      Frequent language changes are one of the biggest flaws of PHP.

      I was thinking of learning PHP, and read this thread in the hope of finding some enlightenment. But I had to read as far as this comment before I found any.

      Folks, if you want a tool for serious work (as distinct for hacking together a web page that nobody reads), don't use a language that keeps changing. Languages like that are toys, not tools. You need something with at least the stability of Perl.

  69. PHP Compiling by 5n3ak3rp1mp · · Score: 1

    This is slightly off-topic, but is there a way yet to cache a compiled version of a PHP page (e.g., ASP+ or ASP.NET) so that repeated page views of unaltered code aren't wastefully re-interpreted over and over?

    1. Re:PHP Compiling by Ded+Bob · · Score: 1

      Several ways. I personally use APC. Zend has a few products that speed up PHP performance.

  70. Start Under IIS by weston · · Score: 1

    You may want to start writing PHP under IIS -- they play pretty well together, you get a few extra windows goodies and keep using a platform you know while preparing to jump to one that may be less familiar.

  71. This book is actually terrible. My PHP-Mag review by Raspberry · · Score: 2, Interesting

    I actually reviewed this book for PHP Magazine [www.php-mag.net] in October.
    It's supposed to be published in one of the next few issues.

    This book is terrible -- If I were to give it a slashdot review rating -- it would be *3* and that is being generous.

    Below is the hyperlink to my review:
    http://www.wizardtechnologies.net/reviews/phpmag-c pp.html

    --
    ------------------------------
    Ray Raspberry
    raspberry@b3l33t.org
  72. Re:1041 pages of PHP? by tomstdenis · · Score: 1

    Such companies then shouldn't be able to process private data. Really that simple. Can't afford a professional you can't do business.

    As to your off hand remark about India there are plenty of developers in the States that would gladly code a website. The problem is they demand competitive wages [not slave labour rates].

    So yeah, if you're company is small then you outsource for developers. You don't just cut corners and have your janitor develop your website...

    Tom

    --
    Someday, I'll have a real sig.
  73. Zeevs lastname is Suraski by JoScherl · · Score: 1, Informative

    Hi,

    just asmall note: Zeevs lastname isn't Juraski, as said in the "Book info box" in the author field but it is Suraski.

  74. Re:1041 pages of PHP? by proj_2501 · · Score: 1

    "Such companies then shouldn't be able to process private data. Really that simple. Can't afford a professional you can't do business."

    There is no reason for most websites to deal with anything more than a session identifier to keep your browsing preferences. IF that.

  75. Online REFERENCE by MrChuck · · Score: 2, Insightful
    The online stuff is fine REFERENCE material. It answers questions from the "what are the arguments that THIS FUNCTION takes?"

    There are also, like any real world programming language, many ways to approach the same problem.
    Sometimes there are BAD ways (a function might exist to do something simple and quickly and shouldn't be used as part of a more complex solution)

    The online docs don't answer the questions like:
    What's the best way to read in an apps config file and perhaps even write it back out?
    How can I write a random cookie to someone and use that value as a lookup into a database of current state and other information (and expire said info for out-of-date sessions)?
    Can I easily use XML for configs rather than .ini files?

    Books can show best practices, hazards in using certain functions, how some suites of functions best interact with other uses, etc. A book may also elide certain functions that are older and perhaps better replicated in newer functions - code waiting to die (once that PHP2 stuff gets redone).

    This sort of thing has no place in documentation for a list of functions.

    We could call is "user manual" vs. "reference manual". Online docs for PHP are a great reference manual.

  76. using Perl or C/C++ to generate HTML by Tumbleweed · · Score: 1

    Ahh...job security. :)

  77. Re:1041 pages of PHP? by prockcore · · Score: 1

    A corporate web designer's job SHOULD be to make the web site look nice and make it easily navigable. Code is not the first priority. Why pay for a code monkey AND a web monkey if you only need very basic code with a nice layout?

    I don't know of any corporate web site that doesn't require programming.

    If a site is important and complex enough to require a web designer, it will also require a web programmer.

  78. Re:Needed? (Obligatory reply) by Trejkaz · · Score: 1

    If you think it's ugly online, it will be ugly when printed out, and just less useful since you won't be able to find anything quite as easily.

    --
    Karma: It's all a bunch of tree-huggin' hippy crap!
  79. Re:1041 pages of PHP? by Trejkaz · · Score: 1

    Because web monkeys suck at making valid HTML. The code monkey should write all the HTML and tag it to death so that the web monkey can just stick to what he knows, either writing CSS or another sort of transform to style the page.

    --
    Karma: It's all a bunch of tree-huggin' hippy crap!
  80. Perl can embed in HTML too. by Trejkaz · · Score: 1

    It's called HTML::Mason.

    --
    Karma: It's all a bunch of tree-huggin' hippy crap!
    1. Re:Perl can embed in HTML too. by Christianfreak · · Score: 1

      Yes I know of this. But that's a choice you have rather than what the language is built around.

      Its also the reason I've never used Mason, I disagree with that practice.

    2. Re:Perl can embed in HTML too. by Trejkaz · · Score: 1

      I've never liked Mason either, but mostly because it's a shoddy imitation of JSP on a language designed for quick hacks and nothing more.

      --
      Karma: It's all a bunch of tree-huggin' hippy crap!
    3. Re:Perl can embed in HTML too. by Brother52 · · Score: 1

      If this was so, I don't think Amazon.com would have selected Mason as their official templating system and be currently hiring Mason developers.

    4. Re:Perl can embed in HTML too. by Trejkaz · · Score: 1

      Absolutely. Just because someone is using something, guarantees it isn't shit.

      --
      Karma: It's all a bunch of tree-huggin' hippy crap!
  81. Re:1041 pages of PHP? by tomstdenis · · Score: 1

    Yeah but if you're website gets to the point where you need PHP to make it go you should get a professional developer to do it for ya. Even if it's your own data behind the scenes.

    Still my main point stands. The bulk of these programming books are just recycles with a new lang behind it.

    Tom

    --
    Someday, I'll have a real sig.
  82. Re:Needed? (Obligatory reply) by Anonymous Coward · · Score: 0

    While I agree with you in theory, have you actually tried to learn PHP from the on-line documentation.

    My favorite repeated these goes something like this: "There are two methods to accomplish X. You can do Y or Z. Please note, Z is a recently added feature to work around the security issues with method Y. In this document, we will only spend any amount of time documenting method Y."

    I have seen something along these lines a number of places.

  83. Re:Needed? (Obligatory reply) by larry+bagina · · Score: 1

    6. it could disappear without a trace 7. it could get slashdotted.

    --
    Do you even lift?

    These aren't the 'roids you're looking for.

  84. Re:Needed? (Obligatory reply) by Anonymous Coward · · Score: 0

    Use the dual monitor support: one for documentation and the other for coding. Simple.

  85. Re:Sorry, but this is fucking stupid. by dmuth · · Score: 1

    Just so you know, I have run across bad Python code before. :-) The programmer who wrote it decided he couldn't be bothered to write functions and classes and instead indented by 5 or 6 tabs. Reading it was quite painful.

    I guess the moral of the story is that no matter how well you design a programming language, it won't help any if the programmer is sufficiently stupid/lazy.

  86. Cheap Up-and-Running Guide by chewtoy-11 · · Score: 1

    Wow, too bad I didn't read this article earlier. I recently bought one of Barnes and Noble's PHP books. (They actually have their own line of books now) It's called PHP: In Easy Steps. It's a super light read (192 pgs), and addresses the simple things like String concatenation, using arrays, and even using MySQL with PHP, all at a brand new cover price of $9.95. The book was written by Mike McGrath. It gets you into USING the language, then you can refer to php.net for specific function information.

    --
    C. Griffin
    "Can I keep his head for a souvenir?" --Max from Sam 'N Max Freelance Police
  87. Re:Needed? (Obligatory reply) by October_30th · · Score: 1

    After you get in deep shit because of a company mail server losing a mail with a quotation in it, you start printing out every goddamn piece of mail that may or may not get you in trouble.

    --
    The owls are not what they seem
  88. Re:Needed? (Obligatory reply) by October_30th · · Score: 1
    If you think it's ugly online, it will be ugly when printed out, and just less useful since you won't be able to find anything quite as easily.

    The main advantage of a hardcopy: orders of magnitude more dots-per-inch. You can also earmark pages to find the important stuff and enjoy the pure tactile pleasure of handling something concrete.

    --
    The owls are not what they seem
  89. Re:Needed? (Obligatory reply) by Trejkaz · · Score: 1

    You can't earmark pages to find the important stuff. You find the important stuff, then earmark the pages.

    I'm not particularly fond of handling something concrete if it's going to make it a bunch more inconvenient to find things. I can find an arbitrary PHP function on the PHP site just by putting its name after php.net in the URL. With a printout, no such luck. With a book, you have to find the index, then find the function, then find the page.

    Honestly for a bunch of programmers you think efficiency would come high up the ladder of importance. Oh wait, we're talking about PHP. Scratch that.

    --
    Karma: It's all a bunch of tree-huggin' hippy crap!