Stories
Slash Boxes
Comments

News for nerds, stuff that matters

Slashdot Log In

Log In

Create Account  |  Retrieve Password

Recommended Reading List for PHP

Posted by Zonk on Thu Mar 16, 2006 05:25 PM
from the i'm-told-that's-a-popular-drug dept.
Steve writes "IBM developerWorks has put together a PHP recommended reading list. It provides resources for developers and admins adopting PHP and tackling advanced topics such as building extensions and writing secure code. There's also a list of books and blogs for keeping up with changes to the language itself."
+ -
story
This discussion has been archived. No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More
Loading... please wait.
  • Forgot one (Score:5, Funny)

    by Anonymous Coward on Thursday March 16 2006, @05:27PM (#14937338)
    They forgot the most important article on PHP! What it is:

    http://uncyclopedia.org/wiki/PHP [uncyclopedia.org]
  • by pestilence669 (823950) on Thursday March 16 2006, @05:39PM (#14937401)
    This book was Slashdotted a few months ago. It's written and endorsed by members of the core PHP team. It's the most accurate language resource I've come across. It covers the PHP language, while I've found that other books tend to offer cookie-cutter "recipes" for common scenarios (code snippets). Sadly, its mention of interfaces is a bit sparse and it pre-dates PHP 5.1's PDO. Nevertheless, I still find it very relevant for anyone doing OOP with PHP. There are one or two gems not found in the online documentation.

    NOTE: It's better to have some PHP programming experience before reading.

    ISBN: 0-13-147149-X
  • by Duncan3 (10537) on Thursday March 16 2006, @05:49PM (#14937479) Homepage
    Not a dupe...
    Actually useful...
    First post wasn't about a Beowulf cluster or Soviet Russia...

    What happened to Slashdot???

    My faith will be restored if this article is duped within 24 hours.
  • I'll have to check out those books. I'm ashamed to say that I don't know as much about PHP as I should. While I was busy trying to decipher Open Source Perl code (to learn from) the web standardised on PHP, and I know next to nothing about it!
    I just hope there's an emacs mode for PHP, I'd hate to have to go back to using VIM to code.
    • by Senzei (791599) on Thursday March 16 2006, @06:55PM (#14937894)
      The web hasn't standardised on PHP, there is an emacs mode for it, and you will probably come to hate it.

      It has always seemed like the bash of web programming, except uglier and slightly more difficult to use. It works, but if you push it too hard or the wrong way it feels like you are trying to make a mud sculpture.

      • by edwdig (47888) on Friday March 17 2006, @02:22AM (#14940041) Homepage
        If you think PHP is ugly, try looking at ColdFusion. Same basic idea as PHP, but you get to write you code in HTML style syntax. You also get Fortran style operators (gte instead of >=, lt instead of <, etc) Damn near impossible to quickly glance at large block of code and figure out what's going on. The code doesn't stand out from the HTML, and you've got a ton of keywords due to all the information being passed HTML attribute style.

        Fun stuff like this...

        <cfloop index="i" from="0" to="10" step="1">
            <cfif i mod 2 is 1>
                <cfoutput>#i# is odd</cfoutput>
            <cfelse>
                <cfoutput>#i# is even</cfoutput>
            </cfif>
        </cfloop>

        You also get some really odd language decisions. For example, when they first added support for functions there were no return values. To work around this, you had a special local variable called "caller" which was a structure containing the local variables of the previous scope. They eventually fixed this, but PHP's language problems don't look so bad compared to that.
    • I'm ashamed to say that I don't know as much about PHP as I should.

      I have learned just last week that the best way to learn PHP is to suddenly become a webmaster hosted on a Linux server using various installed content-management tools like b2evolution or WordPress for blogging and Coppermine for image gallery. You will simply be *thrust* into PHP with no second option. In fact, my host has something like 50 tools available to use and I think only 3 of them aren't PHP.

      Call it geek-fatigue, but the thing

  • If security is threated as advanced topic in PHP, no wonder this language has such lousy reputation.

  • Nooo!!!! (Score:5, Insightful)

    by drew (2081) on Thursday March 16 2006, @06:22PM (#14937709) Homepage
    And this is why I hate web programming and web programming languages:

    It provides resources for developers and admins adopting PHP and tackling advanced topics such as building extensions and writing secure code.

    Why is this considered an advanced topic? Security should be the first thing anyone writing software for the web learns. And web programing languages need to make it easy to write secure code by default. *Sigh*
    • Re:Nooo!!!! (Score:3, Interesting)

      Out of honest curiosity, is that how perl is? I'm a fledgling programmer myself, using PHP. There's a lot of talk about it being insecure, and not being a True Programming Nerd, I have no real idea why.

      This itself raises the issue that if a language is too easy to write securely by default, people starting out in it won't learn to think about security when they code, which is a short term vs long term thing. The phrase "too secure" does sound a little moronic though...

      For the record, my code is incredibly p

      • Re:Nooo!!!! (Score:5, Funny)

        by Hosiah (849792) on Thursday March 16 2006, @07:41PM (#14938159)
        is that how perl is

        Perl: Take every programming language you know now. Mix them all together. That's Perl. No, not the functionality, just the syntax.

      • Re:Nooo!!!! (Score:4, Informative)

        by Craig Maloney (1104) * on Thursday March 16 2006, @09:01PM (#14938595) Homepage
        The reason people find PHP so insecure is because you can plop a script practically anywhere on the server, and have it run. So, if one of the scripts allows someone to upload somewhere where they shouldn't, BAM, you're compromised.

        I've found this out first-hand with a few PHP scripts I've run. It's amazingly easy to set up, but it's also a discipline in itself to ensure it keeps crackers out.
      • PHP used to have horrible defaults. This has improved, but a lot of application programmers still require old style settings.

        The core language is huge. PHP lacks namespaces, making all variables global.

        PHP is _extremely_ easy for newbie programmers to mess with. This has practically made it the visual basic of the Linux/Unix world.

        On the other hand, Perl went through this evolution a few years ago. (The lack of use strict and use warnings by default is _still_ a known bug). Perl has a taint mode, where the
        • I am more or less an intermediate PHP hacker. Most of my experience is in Perl and mod_perl.

          Right now, what I find the most frustrating about PHP is the embedded model. It seems that you have to jump through a lot of hoops to work around that. Maybe once you get used to jumping through those hoops it is okay, but (for me anyway) it seems like I am working against the language when I want to abstract webpages away from their files, for example.

          It seems to me that this is one of those areas where the easy

    • Why is this considered an advanced topic?

      Indeed. The one thing that makes the absurdity of this point of view apparent is when you point out that "secure code" is a synonym for "correct code". If you write bug-free code, then you've basically eliminated security holes. That reduces "security is an advanced topic" to "writing code that isn't full of bugs is an advanced topic", which isn't exactly defensible.

  • by caluml (551744) <slashdot@[ ]mgoe ... g ['spa' in gap]> on Thursday March 16 2006, @06:29PM (#14937743) Homepage
    Only thing I've ever needed to read to learn PHP is fr.php.net [php.net]. (Because the UK mirror is slower.)
  • Templating systems (Score:3, Informative)

    by Spy der Mann (805235) <spydermann.slashdot@NoSpAm.gmail.com> on Thursday March 16 2006, @06:34PM (#14937778) Homepage Journal
    This one's an ABSOLUTELY MUST-READ for those who don't know what template engines are:

    http://www.sitepoint.com/article/beyond-template-e ngine [sitepoint.com]
    • Bleh. What's wrong with XML and XSL? Seriously... The developer generates the XML document structure, then passes it through the XSLT processor, applying an XSL stylesheet created by the web designer. Standards all the way...
      • Bleh. What's wrong with XML and XSL?

        It's not supported in PHP4. Sure, there are the extensions, but they're NOT installed by default in common server configs, so you'd have to do it by hand, and that's SLOOOOOOWWW.
  • 5 good PHP sites (Score:5, Informative)

    by Anthony Boyd (242971) on Thursday March 16 2006, @06:35PM (#14937784) Homepage

    Their list is great -- I'll be reading some of those articles for weeks before I get through them all. I'm especially interested in the 7 security blunders article. Nice!

    But they did leave off a lot of sites that are useful. Here are a few:

    • PHP Resource Index [resourceindex.com] - a few thousand scripts for downloading, most free, all PHP.
    • PHP Builder Forums [phpbuilder.com] -- the PHP Builder site is pretty useful all by itself, but in the forums there are thousands of people willing to answer your PHP questions.
    • PHP Freaks [phpfreaks.com] -- one of the guys behind this site wrote a great PHP book. The site is excellent.
    • ADOdb Database Abstraction Layer [sourceforge.net] -- okay, okay, this isn't really a site, so much as a product. But still, it's a very efficient DBAL, and it should be used for every database query.

    Anyone want to pitch in with some more? I'm sure there are some very useful sites that I've completely missed (and which the IBM site missed, too).

  • by Anonymous Coward on Thursday March 16 2006, @06:46PM (#14937835)
    PHP is a powerfull language not only for the web, but for general purpose programming. Please, experienced C and C++ programmers do a favor to yourselfs and give it a try, testing algorithms can be done in a very short little time, in contrast to other languages.
    It's a breeze in the ocean!

    http://www.codingheaven.net/ [codingheaven.net] http://www.codingheaven.net/ [codingheaven.net]
    • Hehehehe. Oh my.

      Some mods failed to catch the subtle sarcasm of the parent post, eh? :)
      • by Jesus_666 (702802) on Friday March 17 2006, @09:34AM (#14941383)
        Well, PHP is useful for general purpose scripting. I went from web scripting to shell scripting and I'm much more proficient at PHP than I am at Python or sh, so when I have to write shell scripts I usually go with PHP. Yes, I know that sh is faster. Yes, I know that Perl has better PR. But I can just crank out a PHP script in half the time it takes me to read awk's manpage or whatever I need to get that sh script going.

        It might not be the cleanest language around, but it allows for fairly rapid script development when you're familiar with it. Also, it has the most useful documentation of any scripting language I have ever seen, even more useful than Java's API documentation.
  • by MattW (97290) <matt@ender.com> on Thursday March 16 2006, @07:04PM (#14937941) Homepage
    I'm glad to see that at the top of the list. I haven't read all those php books, but I am a very experienced developer in the language, and that book is fabulous. It manages to cover many topics, and with astounding clarity and insight. Definitely a master work on the topic.
  • ... on when and when not to use PHP: Experiences of Using PHP in Large Websites [ukuug.org] (Aaron Crane, UKUUG Linux Conference 2002).
  • 'Programming Perl' by Larry Wall
    • Re:Ah, yes (Score:4, Insightful)

      by lymond01 (314120) on Thursday March 16 2006, @05:41PM (#14937420)
      Meh. For web-based applications on a small to medium level, PHP is the way to go. You can say it's just a scripting language and therefore not a "real" programming language if your definition of "real" does not include a language with defined syntax, for loops, variables, arrays, system calls, objects, classes, etc.

      But then what would you call it? An egg? No...that's taken by those round things chickens lay. I've no idea really. I'll just go with programming language and leave the modifiers out.
    • Re:How about this (Score:3, Insightful)

      by temojen (678985)
      How about compulsory reading of a C++ or Java OO book, even before you know what "var $myVar" is.
      I've used C, C++, Java, JavaScript, PHP, Perl, Scheme, Prolog, Cobol, plPGSQL, x86 Assembler, VAX Assembler, 68hc11 Assembler, and TCL, and I don't know what language you'd use the statement "var $myVar" in.
      • I've just tested it on my local copy of my site, in php, and it seems to work similarly to 'exit'.
        • Oh yeah, I've been editing other people's non-OO PHP for a few months. It's been a while since I made classes. The code I've been editing has business logic and presentation badly mixed, and editing it involved wadeing through reams of nested tables.
        • Now you see how stupid you are for coding while angry? You forgot to put anything in your function! That's what I call a messy habit!
        • Wow dude you are so cool. You must get all the ladies.....

          Sweetheart, 20 years ago he would have been bragging. *Now* he's just trying to KEEP UP. (Notes lack of Python or Ruby) and he's losing!