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.

PageDescription
UpdatePassing null to Built-In String Functions in PHP 8.1+
UpdateDeprecated: Implicit conversions from a float to an int
ClarificationError Reporting: When to use E_ALL and -1
p260 First line of the final code diagram should be: foreach ($star_ratings as $option)
p297Update to create_filename() function
p477 + p495On 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-7Updated code diagrams that have extra = symbols
p490Last line of code should be: $result = pdo($pdo, $sql)->rowCount();
p513Step 2 updated in the code download (Jan 2023)
p553The large size code should not have a semicolon after the closing curly brace
p586In the last code section the else if should read: {% elseif time >=12 and time < 5 %}
p611Step 6: Should use strict comparison operator to check password matches (as on p631)
p643Comments describing steps 5 and 8 are the wrong way around