libcats.org
Главная

A Programmer's Introduction to PHP 4.0

Обложка книги A Programmer's Introduction to PHP 4.0

A Programmer's Introduction to PHP 4.0

OK, on the upside: This book is very readable, very light. Some texts are so dense that they almost necessitate being read in 10-page increments. Thankfully, this book is comparably straightforward, and there is a lot of relevant content covered.



Unfortunately, there are quite a few typos and numerous instances of ambiguous code that could easily throw off beginning programmers. These include:



1.) Multiple instances where "-" (single minus sign) is used as a decrement operator, which will not work (i.e., $x-; whereas it should be $x--;).



2.) Page 68 - Presents the do..while loop in VB-style syntax (that is, with the do keyword followed by a colon and then line-separated statements, rather than with a C-style code block in {braces}). On the next page, the author then informs us that the VB-style syntax, which is offered for while loops and for loops, is actually not available for the do..while loop. So why was it presented that way on the previous page? I suppose it was meant to be a pseudo-code representation, and not the actual syntax - but it's certainly misleading.



3.) Page 76 - Convoluted description of "continue n;" syntax: "The optional n acts as the opposite of the n accompanying the break statement, specifying to the end of how many levels of enclosing loops the continue statement should skip." Eh? I found this one to be rather difficult to comprehend, especially since no example was provided.



4.) Page 66 - At the top of the page, the first line of code reads, 'if ($food == "pasta")', but the accompanying comment for that line reads, '//check $pasta value', even though it is the value of $food we are checking (NOT the value of $pasta).



5.) For example, on pp. 90-91, the syntax for the 'include' function is listed first as 'include(path/filename);' (parentheses but no quotes around path) and then, alternatively, as 'include "path/filename";' (with quotes around path, but no parens). But in the example that follows, it is written as 'include ("array_sorting.inc");' - which contains both quotes AND parentheses. I suppose all three are acceptable - but this is not stated explicitly, and as such, it's very unclear.



All in all, not a bad book in terms of content covered, but it definitely should have been edited more carefully. If you're relatively comfortable with another programming language already, you'll probably catch most of the typos - but I'd still keep the PHP documentation handy.
Ссылка удалена правообладателем
----
The book removed at the request of the copyright holder.
Популярные книги за неделю:
Только что пользователи скачали эти книги: