Errata

PHP: The Good Parts

Errata for PHP: The Good Parts

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.

Color Key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted by Date submitted
Printed, PDF Page 9
3rd paragraph

Use of the sorter open tag format <? has been depreciated and only works in .....

should be

Use of the sorter open tag format <? has been deprecated and only works in .....

The words depreciated and deprecated may look similar but they have very different etymologies.

The dominant modern meaning of the verb to depreciate is to reduce in value.

In an IT context the dominant modern meaning of the verb to deprecate is to give 'something' the status of now not being supported, of now advised against, of now not considered best practice, etc. whilst the 'something' remains available for use as before (but possibly for a limited time).

These word are often mistaken for each other in print (where they look similar) but are easily distinguished in a spoken context (due to their rather different pronunciation - see below).

The word depreciated has a soft C - de-pre-she-ated
The word deprecated has a hard C - dep-re-kay-ted


Ian Hartnell  Feb 13, 2015 
Printed Page 12
Figure 2-1 Output for defined constant...

2019 httpd-2.4.39 with php-7.3.7.
Only warnings, nothing serious. Constant names are case-insensitive by default.

Using ln -s /etc/php.ini-development php /etc/php.ini on localhost
(error_reporting = E_ALL)

Please refer to
https://www.w3schools.com/php7/php7_constants.asp
https://php7.org/guidelines/

define(name, value, case-insensitive)

[Adding "true" makes the name case-insensitive]

Deprecated: define(): Declaration of case-insensitive constants is deprecated on line 3
System owner is:Peter

Notice: Constant SYS_OWNER already defined on line 5
System owner is:Peter
System manager is:Simon

[Mixing case in a constant name makes it case-insensitive]

Deprecated: Case-insensitive constants are deprecated. The correct casing for this constant is "SYS_MGR" on line 8
System manager is:Simon

Henry Pfeil  Aug 04, 2019 
Printed Page 64
function Input()

Also in the code download for chapter six.

The function argument ``align="center"'' is listed twice in the function declaration:

function Input($InputType, $EntityName, $value="", $align="center", $size="", $id="", $align="center", $readonly="", $class="",
$onType1="", $onAction1="", $onType2="", $onAction2="", $onType3="", $onAction3="")

I am really surprised it has not been mentioned yet. The second overwrites the first, and annoys the IDE, and there is no purpose in putting in the same argument twice.

David

David Weeks  Oct 15, 2015