Updates
Changes to PHP, clarifications of code in the book, and errata.
We try to ensure that our books are error-free, but this page will detail any code errors that were found after printing.
It will also show updates to the PHP language that are helpful for beginners to learn or affect the code in the book.
| Page | Description |
|---|---|
| Update | Passing null to Built-In String Functions in PHP 8.1+ |
| Update | Deprecated: Implicit conversions from a float to an int |
| Clarification | Error Reporting: When to use E_ALL and -1 |
| p260 | First line of the final code diagram should be: foreach ($star_ratings as $option) |
| p297 | Update to create_filename() function |
| p477 + p495 | On p477 in Step 16 the variable $term and on p495 in Step 7 the variables $success and $failure should use the html_escape() function described on p245. |
| p486-7 | Updated code diagrams that have extra = symbols |
| p490 | Last line of code should be: $result = pdo($pdo, $sql)->rowCount(); |
| p513 | Step 2 updated in the code download (Jan 2023) |
| p553 | The large size code should not have a semicolon after the closing curly brace |
| p586 | In the last code section the else if should read: {% elseif time >=12 and time < 5 %} |
| p611 | Step 6: Should use strict comparison operator to check password matches (as on p631) |
| p643 | Comments describing steps 5 and 8 are the wrong way around |
PHP & MySQL