global – PHP Reference Book Blog https://phpreferencebook.com/ PHP Reference: Beginner to Intermediate PHP5 Sun, 01 Oct 2017 17:21:19 +0000 en-US hourly 1 https://wordpress.org/?v=4.9.13 define() referenced in Global Variables https://phpreferencebook.com/clarifications/define-referenced-in-global-variables/ Wed, 30 Apr 2008 05:03:14 +0000 https://phpreferencebook.com/?p=9 Continue reading define() referenced in Global Variables]]> (pg. 33)

The opening sentence for the Global Variables chapter reads as follows:

While some global variables can be created through the use of
define(), some are reserved because of a special function, giving access to
different types of data.

Technically, the define() function creates a constant that is available globally, as is described properly as part of the function on page 11. Therefore, the sentence would be better phrased as follows:

While some constants can be made available globally through the use of
define(), some are reserved because of a special function, giving access to
different types of data.

]]>
$_SERVER[‘QUERY_STRING’] in Global Variables https://phpreferencebook.com/corrections/_serverquery_string/ Wed, 30 Apr 2008 04:50:37 +0000 https://phpreferencebook.com/?p=8 Continue reading $_SERVER[‘QUERY_STRING’] in Global Variables]]> (pg. 33)

The description in the book reads:

$_SERVER[‘QUERY_STRING’] – The current scripts path

This description is the same as the entry above, because I made a bad edit (copy/paste for formatting). The correct description would be as follows:

$_SERVER[‘QUERY_STRING’] – The current query string (without the question mark)

The example is correct and accurate, and luckily this is painfully obvious thanks to the name of the key QUERY_STRING in the $_SERVER array.

]]>