Top critical review
Lacks in structure, examples not great
on October 4, 2011
I bought this book with the intent to have it as my coding companion. I am disappointed. Besides some typos and messed up code (for example the date formats on page 407 are all screwed up), I take issues with the following:
- The book is not useful as a reference. For example, Chapter 5: Arrays, mentions some of the functions which apply to arrays, but does not go into any details. The array functions are listed in the reference section, but without knowing that the function applies to array objects, there will be no way to know what to look for. For example, the "usort" function, which takes a function reference to do the element comparison, has only a cursory mentioning in the Arrays chapter; it is covered in the reference, but there was no way for me to know what to look for without looking it up online. The "+" operator, which merges two arrays when given arrays as arguments, is not covered at all (or perhaps I couldn't find it).
- The code examples are bad. Authors have used their initials in some examples related to string comparison, but it takes some effort to follow the code when you have strings such as "njt", "jj", and "jht". I would have preferred "abc" and "xyz". The code examples are HTML-centric, and include many tags, which make reading the code hard; for example, "<tr><td>kt</td><td><492><td></tr>" (page 135) could have been simply "Kevin, 492". There is no separation between code and output -- no empty line between them, and they use the same font. The reference section does not contain any examples or in-depth explanations, or any gotchas.