PHP header_register_callback() Function
Example
A getservbyname() example:
<?php
$portnum = getservbyname("http", "tcp");
echo $portnum;
?>
Definition and Usage
The header_register_callback() function calls a header function (will be executed after PHP has prepared all headers to be sent, and before any other output is sent).
Syntax
header_register_callback(callback)
Parameter Values
Parameter | Description |
---|---|
callback | Required. Specifies a callback function |
Technical Details
Return Value: | TRUE on success. FALSE on failure |
---|---|
PHP Version: | 5.4+ |
❮ PHP Network Reference