Language Options

Table H-2. Language and Misc Configuration Options

NameDefaultChangeable
short_open_tagOnPHP_INI_SYSTEM|PHP_INI_PERDIR
asp_tagsOffPHP_INI_SYSTEM|PHP_INI_PERDIR
precision"14"PHP_INI_ALL
y2k_complianceOffPHP_INI_ALL
allow_call_time_pass_referenceOnPHP_INI_SYSTEM|PHP_INI_PERDIR
expose_phpOnPHP_INI_SYSTEM
zend.ze1_compatibility_modeOffPHP_INI_ALL

Here's a short explanation of the configuration directives.

short_open_tag boolean

Tells whether the short form (<? ?>) of PHP's open tag should be allowed. If you want to use PHP in combination with XML, you can disable this option in order to use <?xml ?> inline. Otherwise, you can print it with PHP, for example: <?php echo '<?xml version="1.0"'; ?>. Also if disabled, you must use the long form of the PHP open tag (<?php ?>).

Note: This directive also affects the shorthand <?=, which is identical to <? echo. Use of this shortcut requires short_open_tag to be on.

asp_tags boolean

Enables the use of ASP-like <% %> tags in addition to the usual <?php ?> tags. This includes the variable-value printing shorthand of <%= $value %>. For more information, see Escaping from HTML.

Note: Support for ASP-style tags was added in 3.0.4.

precision integer

The number of significant digits displayed in floating point numbers.

y2k_compliance boolean

Enforce year 2000 compliance (will cause problems with non-compliant browsers)

allow_call_time_pass_reference boolean

Whether to enable the ability to force arguments to be passed by reference at function call time. This method is deprecated and is likely to be unsupported in future versions of PHP/Zend. The encouraged method of specifying which arguments should be passed by reference is in the function declaration. You're encouraged to try and turn this option Off and make sure your scripts work properly with it in order to ensure they will work with future versions of the language (you will receive a warning each time you use this feature, and the argument will be passed by value instead of by reference).

Passing arguments by reference at function call time was deprecated for code cleanliness reason. Function can modify its argument in undocumented way if it didn't declared that the argument is passed by reference. To prevent side-effects it's better to specify which arguments are passed by reference in function declaration only.

See also References Explained.

expose_php boolean

Decides whether PHP may expose the fact that it is installed on the server (e.g. by adding its signature to the Web server header). It is no security threat in any way, but it makes it possible to determine whether you use PHP on your server or not.

zend.ze1_compatibility_mode boolean

Enable compatibility mode with Zend Engine 1 (PHP 4). It affects the cloning, casting, and comparing of objects.