Endnotes
(*1) Using FORMAT:
Each specified conversion is built with a percentage sign (%) and then one or more of the following elements, in this order:
- A sign operator that is either (- or +) to be used with a number. By default, this sign is only necessary when the number is negative. However, to allow for the possibility of forcing numbers to be positive the + sign is included, this was added in PHP 4.3.0.
- A default completion character specifies which character should be used to complete the value in the result of the String being smaller than the required value. This could be a space or 0, with a space being the default value. An alternative completion character can be used but needs to be prefixed with an apostrophe ('). See the examples below.
- An optional alignment specifier, which indicates whether the result should be aligned to the left or right; by default, the result is justified to the right, by adding a - you can specify that the character should be aligned to the left.
- An optional integer value specifies how the minimum size (how many characters) the conversion should result in.
- An optional precision specification value, which takes the format of a full stop (.) followed by an optional string of decimal digits indicates to what decimal level any floating point numbers should be displayed. When you use this specification value with a string it acts like a cutoff point that establishes the maximum length of the string.
- A type specifier which indicates how the actual parameter data should be treated. The possibilities are:
% - a literal percentage character. This requires no parameters.b - the parameter is treated as an integer and presented as a binary number.c - the parameter is treated as an integer and presented as a character with an ASCII value.d - the parameter is treated as an integer and presented as a decimal number (with a sign).e - the parameter is treated as scientific notation (e.g. 1.2e+2). The precision specification value indicates the number of digits that should come after the decimal point since PHP 5.2.1. In previous versions, it was taken as the number of significant figures (one less).E - works the same as %e but using uppercase letters (e.g. 1.2E+2).u - the parameter is treated as an integer but presented as a decimal number without a sign.f - the parameter is treated as a float and presented as a floating point number (the regional configuration of decimals is considered).F - the parameter is treated as a float and presented as a floating point number (the regional configuration of decimals is NOT considered). Available since PHP 4.3.10 and PHP 5.0.3.g - shorter than %e and %f.G - shorter than %E and %f.- o - the parameter is treated as an integer and presented as an octal number.
s - the parameter is treated and presented as a string.x - the parameter is treated as an integer and presented as a hexadecimal number (with lowercase letters).X - the parameter is treated as an integer and presented as a hexadecimal number (with uppercase letters).