PHP Function Reference

PHP Output Function - Runtime Configuration



The behavior of the error functions is affected by settings in php.ini.

Output Control configuration options

NameDefaultChangeable
output_buffering"0"PHP_INI_PERDIR
output_handlerNULLPHP_INI_PERDIR
implicit_flush"0"PHP_INI_ALL
url_rewriter.tags"a=href,area=href,frame=src,form=,fieldset="PHP_INI_ALL
Before PHP 7.1.0, this was used to set session's trans sid rewrite. From PHP 7.1.0, it is only used by output_add_rewrite_var().
url_rewriter.hosts$_SERVER['HTTP_HOST']PHP_INI_ALL
Available as of PHP 7.1.0

output_buffering

Enables output buffering for all files by setting this directive to 'On'. To limit the size of the buffer to a certain size - maximum number of bytes can be used instead of 'On', as a value for this directive (e.g., output_buffering=4096). This directive is always Off in PHP-CLI.

output_handler

Set the name of the default function which handles the output of all output buffers. Setting any output handler automatically turns on output buffering. Only built-in functions can be used with this directive. For user defined functions, use ob_start().

implicit_flush

false by default. Changing this to true tells PHP to tell the output layer to flush itself automatically after every output block. This is equivalent to calling the PHP function flush() after each and every call to print() or echo() and each and every HTML block.

When using PHP within an web environment, turning this option on has serious performance implications and is generally recommended for debugging purposes only. This value defaults to true when operating under the CLI SAPI.

url_rewriter.tags

url_rewriter.tags specifies which HTML tags are rewritten by output_add_rewrite_var() values. Defaults to a=href,area=href,frame=src,input=src,form= form is special tag. <input hidden="session_id" name="session_name"> is added as form variable.

url_rewriter.hosts

url_rewriter.hosts specifies which hosts are rewritten to include output_add_rewrite_var() values. Defaults to $_SERVER['HTTP_HOST']. Multiple hosts can be specified by ",", no space is allowed between hosts. e.g. php.net,wiki.php.net,bugs.php.net


❮ PHP Output Control Reference