When "register_shutdown_function" is used in the code

Discussion in 'PHP' started by elum.chaitu, Sep 6, 2010.

  1. #1
    When "register_shutdown_function" is used in the code, the following warning is issued:
    --
    Warning: Cannot modify header information - headers already sent in Unknown on line 0
    --
    All goes well when xdebug.so is not used.
    This bug causes PEAR packages to have problems

    PHP Code:

    PHP version is 5.0.0 stable, not -dev (can't choose such an option)

    Sample code:

    <?php

    function logit($x)
    {
    $f = fopen("/tmp/logit.txt", "a");
    fwrite($f, "$x\n");
    fclose($f);
    }

    function sayonara()
    {
    }

    register_shutdown_function("sayonara");

    ?>
     
    elum.chaitu, Sep 6, 2010 IP
  2. Rainulf

    Rainulf Active Member

    Messages:
    373
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    85
    #2
    Rainulf, Sep 6, 2010 IP