×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Core PHP Programming

timothy posted more than 10 years ago | from the completely-harmless dept.

PHP 223

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.

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.

cancel ×
This is a preview of your comment

No Comment Title Entered

Anonymous Coward 1 minute ago

No Comment Entered

223 comments

Pirst Fost (-1, Offtopic)

Anonymous Coward | more than 10 years ago | (#7953708)

Thsi is teh Post on teh SPOKE!~

Re:Pirst Fost (-1, Offtopic)

Anonymous Coward | more than 10 years ago | (#7953902)

TEH SPOKE!!!1``~: Is it good, or is it whack?

Re:Pirst Fost (0)

Anonymous Coward | more than 10 years ago | (#7953978)

problem is: nobody knows

OMG TYLER EAVES = PWNED BY AC FP!!~`1` (-1, Troll)

Anonymous Coward | more than 10 years ago | (#7953988)

Re:OMG TYLER EAVES = PWNED BY AC FP!!~`1` (-1, Offtopic)

Anonymous Coward | more than 10 years ago | (#7954000)

then i opened the comments page and there was this fp and i was like omfg wtf?!2""

Re:OMG TYLER EAVES = PWNED BY AC FP!!~`1` (0)

Anonymous Coward | more than 10 years ago | (#7954019)

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

Re:OMG TYLER EAVES = TeH Ghey! (0)

Anonymous Coward | more than 10 years ago | (#7954064)

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?

Needed? (2, Insightful)

Tyler Eaves (344284) | more than 10 years ago | (#7953717)

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

Re:Needed? (5, Funny)

kev0153 (578226) | more than 10 years ago | (#7953744)

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.

Re:Needed? (-1, Troll)

Anonymous Coward | more than 10 years ago | (#7953750)

PHP's online documentation: Is it good, or is it whack?

JUST SAY NO! (0)

Anonymous Coward | more than 10 years ago | (#7954195)

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

Re:Needed? (0)

Anonymous Coward | more than 10 years ago | (#7954205)

clearly

Re:Needed? (1, Insightful)

Anonymous Coward | more than 10 years ago | (#7953755)

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

Re:Needed? (Obligatory reply) (5, Insightful)

October_30th (531777) | more than 10 years ago | (#7953761)

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.

Re:Needed? (Obligatory reply) (5, Insightful)

Frymaster (171343) | more than 10 years ago | (#7953863)

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.

Sure, and that's all fine, (0)

Anonymous Coward | more than 10 years ago | (#7954020)

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.

Re:Needed? (Obligatory reply) (0)

Anonymous Coward | more than 10 years ago | (#7954014)

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.

Re:Needed? (Obligatory reply) (0)

Anonymous Coward | more than 10 years ago | (#7954112)

Hahahaha. Is that sarcasm? I sure hope so.

Re:Needed? (Obligatory reply) (1)

bwalling (195998) | more than 10 years ago | (#7954141)

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.

Re:Needed? (Obligatory reply) (1)

saberworks (267163) | more than 10 years ago | (#7954153)

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.

The online PHP documentation could be improved (1, Informative)

Anonymous Coward | more than 10 years ago | (#7953769)

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

Re:The online PHP documentation could be improved (4, Informative)

Crewd (199804) | more than 10 years ago | (#7953917)

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

http://php.net/quickref.php

Re:The online PHP documentation could be improved (1, Insightful)

Anonymous Coward | more than 10 years ago | (#7953946)

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).

Re:The online PHP documentation could be improved (0)

Anonymous Coward | more than 10 years ago | (#7954024)

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.

Re:The online PHP documentation could be improved (0)

Anonymous Coward | more than 10 years ago | (#7954136)

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.

Re:The online PHP documentation could be improved (0)

Anonymous Coward | more than 10 years ago | (#7954207)

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.

Re:The online PHP documentation could be improved (3, Informative)

dark_panda (177006) | more than 10 years ago | (#7954090)

I'd suggest taking a look at this page:

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

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

Re:Needed? (-1, Redundant)

DAldredge (2353) | more than 10 years ago | (#7953776)

It looks better and is easier to read on paper.

Re:Needed? (0)

Anonymous Coward | more than 10 years ago | (#7954046)

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

Re:Needed? (1)

DAldredge (2353) | more than 10 years ago | (#7954115)

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

Re:Needed? (4, Interesting)

pogle (71293) | more than 10 years ago | (#7953777)

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.

Re:Needed? (2, Informative)

Matrix9180 (734303) | more than 10 years ago | (#7953796)

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.

Re:Needed? (3, Insightful)

Anonymous Coward | more than 10 years ago | (#7953907)

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?

Re:Needed? (0)

Anonymous Coward | more than 10 years ago | (#7954244)

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?

Re:Needed? (0)

Anonymous Coward | more than 10 years ago | (#7954284)

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

Re:Needed? (5, Insightful)

RetroGeek (206522) | more than 10 years ago | (#7953845)

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.

Re:Needed? (1)

iamdrscience (541136) | more than 10 years ago | (#7954059)

The online docs do not say HOW to program in PHP.
Actually, it does, check it out: http://www.php.net/manual/en/ [php.net]

The first five sections (especially the first to) are more than adequate in teaching how to program in PHP.

Re:Needed? (1)

RetroGeek (206522) | more than 10 years ago | (#7954148)

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.

Re:Needed? (2, Interesting)

heironymouscoward (683461) | more than 10 years ago | (#7953853)

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."

Re:Needed? (1)

hendridm (302246) | more than 10 years ago | (#7953927)

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.

Re:Needed? (2, Interesting)

the_duke_of_hazzard (603473) | more than 10 years ago | (#7954245)

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.

i told u i was harcore (-1, Offtopic)

Anonymous Coward | more than 10 years ago | (#7953718)

First Ninnle Post (-1, Offtopic)

Anonymous Coward | more than 10 years ago | (#7953724)

Woohoo!

Let's hear it for Ninnle Linux!

Do you fly a lot? (-1, Troll)

Anonymous Coward | more than 10 years ago | (#7953731)

do you know if you're labelled red, yellow or green?

Core? (-1, Offtopic)

Anonymous Coward | more than 10 years ago | (#7953753)

Core? I prefer Arm.

Re:Core? (0)

Anonymous Coward | more than 10 years ago | (#7953803)

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

Offtopic but vaguely amusing.

Re:Core? (0)

Anonymous Coward | more than 10 years ago | (#7953915)

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

What? (1, Funny)

Jorkapp (684095) | more than 10 years ago | (#7953754)

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

Re:What? (2, Funny)

arcanumas (646807) | more than 10 years ago | (#7954175)

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.

Is this really the right thing? (1)

rastakid (648791) | more than 10 years ago | (#7953797)

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.

I gotta go with PHP CookBook (2, Informative)

bc90021 (43730) | more than 10 years ago | (#7953805)

No, I'm not selling, but here [oreilly.com] 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.

PHPOOP???? (-1, Offtopic)

Anonymous Coward | more than 10 years ago | (#7953898)

Your exits are NORTH, SOUTH, and DENNIS.

>

Core PHP Programming (1)

ravenswood1000 (543817) | more than 10 years ago | (#7953807)

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.

When PHP looks like an appealing language... (1, Funny)

krog (25663) | more than 10 years ago | (#7953815)

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

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

Obsolete (-1, Redundant)

b0lt (729408) | more than 10 years ago | (#7953817)

This book is completely obsolete, since the PHP online documentation has everything this book has, and more. http://www.php.net is where it's located.

OH LORDY!!! (0)

Anonymous Coward | more than 10 years ago | (#7953967)

S'n on my B U B!

Incomplete PHP5 (4, Insightful)

TekZen (611640) | more than 10 years ago | (#7953820)

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 [jaxn.org]

wow... (1)

twoslice (457793) | more than 10 years ago | (#7954142)

Looks like somebody else got screwed with this book too...

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

PHP in 24 hours 3rd edition does. (2, Interesting)

tolan-b (230077) | more than 10 years ago | (#7954232)

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. [amazon.com]

PHP books *are* needed, just not all of them (4, Insightful)

mgkimsal2 (200677) | more than 10 years ago | (#7953827)

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.

Re:PHP books *are* needed, just not all of them (1)

X-Nc (34250) | more than 10 years ago | (#7954057)

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.

Re:PHP books *are* needed, just not all of them (4, Informative)

mgkimsal2 (200677) | more than 10 years ago | (#7954130)

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

Re:PHP books *are* needed, just not all of them (1)

pacman on prozac (448607) | more than 10 years ago | (#7954242)

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.

PRETTY HOMO PROGRAMMING (-1, Troll)

Anonymous Coward | more than 10 years ago | (#7953833)

Nuff said.

Namespaces (3, Informative)

Anonymous Coward | more than 10 years ago | (#7953838)

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.

Hate it when that happens (1)

djupedal (584558) | more than 10 years ago | (#7953849)

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.

I have a soft spot for PHP... (2, Insightful)

D-Cypell (446534) | more than 10 years ago | (#7953862)

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.

Re:I have a soft spot for PHP... (1)

mortonda (5175) | more than 10 years ago | (#7953980)

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. :/

Sorry, but this is fucking stupid. (-1, Troll)

Krapangor (533950) | more than 10 years ago | (#7953989)

It's wrong to introduce young programmers to semi-professional hacking languages. Ok, PHP is not the worst, e.g. Perl or C are much more evil.
But the main problem is always the same: young people get their coding style fucked. And it's very hard to get rid of bad style.
Good code is not about obfuscation gibberish or hax0ring. It's about reusability, stability and portability.
When did buffer overflows and instable system surface ? At the beginning of the 90ies. And no Mr. Slashjerk 2000 Bill Gates is not to blame. People like Ritchie and Kernigan and Wall are to blame the introduction of gibberish programming languages. These fucked entire generations of programmer. Before C and Perl people had to learn Cobol, Lisp and Fortran and produced stable, working stuff. No Beagle 2 not calling back from Mars.

Re:Sorry, but this is fucking stupid. (0)

Anonymous Coward | more than 10 years ago | (#7954052)

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.

Re:Sorry, but this is fucking stupid. (0)

Anonymous Coward | more than 10 years ago | (#7954110)

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

Real programmers only write in... (3, Insightful)

Saeed al-Sahaf (665390) | more than 10 years ago | (#7954138)

"Real programmers only write in..."

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

Re:Sorry, but this is fucking stupid. (1)

Lordrashmi (167121) | more than 10 years ago | (#7954186)

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.

Re:Sorry, but this is fucking stupid. (0)

Anonymous Coward | more than 10 years ago | (#7954249)

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

Re:Sorry, but this is fucking stupid. (1)

Lordrashmi (167121) | more than 10 years ago | (#7954310)

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.

good book (0)

Anonymous Coward | more than 10 years ago | (#7953876)

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.

PHP Cookbook from O'Reilly (5, Interesting)

Anonymous Coward | more than 10 years ago | (#7953960)

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.

MY BAD BROTHER DAVID (-1, Offtopic)

Anonymous Coward | more than 10 years ago | (#7954009)

DEAR PEOPLE THAT READ THE SLASHDOT ARTICLES,

MY BAD BROTHER DAVID HAS BEEN DIFFAMIMG ME ON THE INTERNET I N
AN SLASHDOT FOR THE PAST 2 YEARS BECAUSE HE IS VERY JEALOUS OF ME
BECAUSE I KNOW POLITICS MUCH BETTER THAN HIM AND ALSO BECAUSE I HAVE 2
GIRLS FRIENDS AND HE H AS NONE BECAUSE MY BROTHER DAVID IS NOT A GOOD
HUMAN BEING.

MY BROTHER DAVID DOES NOT BELIEVE IN GOD AND HE IS A
MATHEMATHICIAN THAT IS STUDYING COMPUTER PROGRAMMING AND IT IS WITH
THIS KNOWLEDGE OF COMPUTER PROGRAMMING THAT HE HAS BEEN DIFFAMING ME
ALL THROUGH INTERNET CONSTANTLY FOR THE PAST 2 YEARS.

I AM A VERY GOOD PERSON ME MISTER MICHAEL BERNARD AND I BELIEVE IN
GOD FOR THE PAST 26 YEARS AND I KNOW ABSOLUTLY WITHOUT ANY DOUBT AT
ALL THAT GOD REALLY EXISTS AND THAT THEY A RE GREEK GODS AND THAT THEY
CREATED ALL THE UNIVERSE. I BELIEVE IN EVERYTHING THAT IS GOOD: GOD,
LOVE, PEACE, JUSTICE, LIBERTY, MEDECINE, SCIENCE, THE ARMY, THE POLICE
FORCES, PSYCHIATRY, RESPECT, GOODNESS, FRIENSHIP AND FINALLY
SEXUALITY.

MY BROTHER DAVID IS VERY JEALOUS OF ME AND HE SENDS MESSAGE FROM
IS INTERNET ADDRESS TO SLASHDOT UNDER ALL SORTS OF NAMES AND ALSO
ANONYMOUS. HE HAS B EEN DESTROYING MY REPUTATION EVERYWHERE IN SLASHDOT
ARTICLES FOR tHE PAST 2 YEARS, HE IS A VERY JEALOUS PERSON AND IS VERY
SICK AND ALSO HE DOES NOT BELIEVE IN GOODNESS.
HE SIMPLY BELIEVE IN BEING BAD AND MEAN TOWARDS HIS GOOD BROTHER
MICHAEL BERNARD, ME, AND HE POSTS MESSAGE TO SLASHDOTS UNDER ALL
SORTS OF NAMES.

HE CAN SEND INTERNET MESSAGES TO SLASHDOT FROM HIS INTERNET
ADDRESS AND MAKE MY INTERNET ADDRESS APPEAR AT THE BEGINNING OF THE
MESSAGE: HE DOES THIS WITH HIS KNOWLEDGE OF COMPUTER PROGRAMMIMG AND
HE ALSO POST MESSAGES UNDER THE SILLY NAME COMMANDER TACO, A
REAL FOOL. GO AND SEE WHAT IS SAID ON INTERNET BAOUT HIM,
COMMANDER TACO IS REALLY HATED ON THE INTERNET AND THIS S ILLY
PERSON IS NOBODY ELSE THAN MY BAD BROTHER D AVID BERNARD.

MY NAME IS MISTER MICHAEL BERNARD, AND MY INTERNET ADDRESS IS
saintmichaelbernard@sympatico.ca BUT YOU CAN NOT TRUST THAT WHAT COMES FROM
THIS INTERNET ADDRESS REALLY WAS WRITTEN BY ME, BECAUSE WITH HIS VAST
KNOWLEDGE OF COMPUTER PROGRAMMIMG MY BROTHER DAVID IS SENDING MESSAGE
FROM HIS INTERNET ADDRESS AND THE INTERNET ADDDRESS THAT APPEARS AT
THE OTHER END, IS MINE: HE IS PLAYING A BAD COMPUTER TRICK, HE IS S
TUDYING PRESENTLY COMPUTER PROGRAMMIMNG AT UNIVERSITY LAVAL IN QUEBEC
CITY AND HE IS DOING HIS SECOND YEAR IN THIS PROGRAM. MY BROTHER DAVID
BERNARDIS THE PERSON THAT SENDS INTERNET MESSAGES UNDER THE NAME
COMMANDER TAC O AND HE IS HATED ON SLASHDOT.

I ASK YOU TO BELIEVE NOTHING THAT MY BROTHER DAVID TELLS YOU: HE
IS A COMPUTER CROOK A ND DESERVES NO CREDIT WHATSOEVER F OR WHAT HE
SAYS.

HE HAS A SICK-MIND AND HE HAS BEEDN TRYING FOR THE PAST YEAR TO D
ESTROY MY REPUTATION ALL THROUGH THE INTERNET, HE HAS SUCCEEDED VERY
WELL IN D OING THIS AND I WILL SHORTLY BE SUING HIM F OR D
IFFAMATION.

BELIEVE ME MISTER MICHAEL BERNARD, THA T BELIEVES IN GOD FOR THE
PAST 26 YEARS AND NOT MY EVIL MINDED BROTHER DAVID THAT DOES NOT
BELIEVE IN GOD A ND HA S VIRTUALLY NO FRIENDS.

I HAVE MA NY F RIENDS, 6 OR 7 FRIENDS AND THEY ALL BELIEVE IN GOD
LIKE ME.

SO, I WANT YOU TO GET THIS A LL AROUND THE INTERNET: MY BROTHER
DAVID IS A LIAR AND HE IS THE CROOK COMMANDER TACO THAT HAS
BEEN HAUNTING SLASHDOT FOR THE PAST 4 or EVEN MORE YEARS.

THANK YOU VERY MUCH FOR READING THIS MESSAGE A ND I A DDRESS YOU
A LL MY BEST SALUTATIONS.

AND I TELL YOU TO CONTINUE TO BELIEVE COMPLETELY IN GOD BECAUSE HE
REALLY AND WITHOUT ANY DOUBT EXISTS.

AMEN. AINSI-SOIT-IL.

ARCHANGEL ST-MICHAEL

books great for preparation... (1)

tertullian (669393) | more than 10 years ago | (#7954033)

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...

Save $$$, buy it used! (0, Troll)

TrollBridge (550878) | more than 10 years ago | (#7954040)

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

WARNING! GOATSE TROLL! (0, Offtopic)

cyt0plas (629631) | more than 10 years ago | (#7954063)

WARNING! GOATSE TROLL!

NOT A GOATSE TROLL! (-1, Troll)

Anonymous Coward | more than 10 years ago | (#7954085)

Please stop with the character assassination. Parent link is safe; nothing to see here!

Re:NOT A GOATSE TROLL! (-1, Offtopic)

Anonymous Coward | more than 10 years ago | (#7954159)

Right, like we can't see the link in the HREF:

http://www.amazon.com/exec/obidos/handle-generic -form/104-6605287-4877524?action=next-page&target= web-search/redirect.html&url=http://goatse.cx&ws_p age=1&ws_position=4&ws_type=google_regular

1041 pages of PHP? (-1, Troll)

tomstdenis (446163) | more than 10 years ago | (#7954048)

You're shitting me right? First off, put the fucking function reference guide online. That guts about 600 pages. Then organize what you want to teach into 200 pages.

Voila 1000 pages => 200 pages.

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.

Tom

Tom

Re:1041 pages of PHP? (0)

Anonymous Coward | more than 10 years ago | (#7954082)

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.

Re:1041 pages of PHP? (0)

Anonymous Coward | more than 10 years ago | (#7954091)

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.

Re:1041 pages of PHP? (2, Interesting)

tomstdenis (446163) | more than 10 years ago | (#7954230)

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

Re:1041 pages of PHP? (1)

proj_2501 (78149) | more than 10 years ago | (#7954260)

"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?

This PHP is really good.... (-1, Troll)

Anonymous Coward | more than 10 years ago | (#7954078)

for me to POOP on!

hahahahahha!

Might as well start learning PHP (1)

tekiegreg (674773) | more than 10 years ago | (#7954145)

Granted IIS is losing it [slashdot.org] 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 :-)

Re:Might as well start learning PHP (1)

slappyjack (196918) | more than 10 years ago | (#7954196)

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.

WHEN ARE YOU ASSHOLES GONNA GET IT?!? (-1, Troll)

Anonymous Coward | more than 10 years ago | (#7954151)

Honestpuck = Jon Katz. JON FUCKING KATZ. Why won't you realize this?!

Fuck Jon Katz and FUCK SLASHDOT!

And Fuck you too Anderson Cooper!

Great for Beginners and Pros (2, Interesting)

whitelabrat (469237) | more than 10 years ago | (#7954165)

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...

Technical Writing (5, Insightful)

JediDan (214076) | more than 10 years ago | (#7954168)

"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.

With PHP5, why not use Perl? (3, Interesting)

waxmop (195319) | more than 10 years ago | (#7954178)

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.

Sounds familiar (2)

tarquin_fim_bim (649994) | more than 10 years ago | (#7954216)

'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?

While I'm all for learning.... (1)

Chuck Bucket (142633) | more than 10 years ago | (#7954262)

...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

Load More Comments
Slashdot Account

Need an Account?

Forgot your password?

Don't worry, we never post anything without your permission.

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>
Sign up for Slashdot Newsletters
Create a Slashdot Account

Loading...