One star is too many: don't buy this book.,
This review is from: PHP and PostgreSQL Advanced Web Programming (Paperback)It's hard to argue than any book has absolutely zero value: even the world's worst book (and this one may be in the running) probably contains some useful information. However, in a worthwhile book, I expect to find a good deal of useful information, and more than that, I expect not to find false information. There are enough errors in the first 60 pages of this book that I am not going to bother reading the rest of it.
Example: p. 50 shows this code segment
The merest child, although evidently not SAMS technical editors, can see the elementary error here, which occurs when $a = $b.
Example: p. 53 shows this code segment
with the comment that the code will return "$a and $b are not the same".
If the author's earlier comment, that "False is returned if both values are the same", is correct, then this is obviously backwards, but beyond that, what is the basis of the comparison? In other languages I'm familiar with, XOR compares two Boolean values, or possibly performs a bitwise comparison on byte values. Are the authors telling us that in PHP XOR performs the same function as the inequality operator? Or is it that in PHP even numbers are True and odd numbers are False? Or what?
The most likely explanation is that this example is simply garbage, and I strongly suspect that the rest of the book, which I no longer intend to read, is the same. I don't know much about PHP, which is why I bought the book, but I know enough about other programming languages to know that I can't have any faith in what this book tells me.