Bug #71891 [Asn->Csd]: header_register_callback() and register_shutdown_function()

From: Date: Fri, 25 Mar 2016 04:35:37 +0000
Subject: Bug #71891 [Asn->Csd]: header_register_callback() and register_shutdown_function()
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-200085@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=71891&edit=1

 ID:                 71891
 Updated by:         laruence@php.net
 Reported by:        david at grudl dot com
 Summary:            header_register_callback() and
                     register_shutdown_function()
-Status:             Assigned
+Status:             Closed
 Type:               Bug
 Package:            Scripting Engine problem
 PHP Version:        7.0.4
 Assigned To:        laruence
 Block user comment: N
 Private report:     N

 New Comment:

Automatic comment on behalf of laruence@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=1929fc9b16c836c1449dee3fd3570031ff8dcba1
Log: Fixed bug #71891 (header_register_callback() and register_shutdown_function())


Previous Comments:
------------------------------------------------------------------------
[2016-03-25 03:09:56] laruence@php.net

However, this triggers a memleak report..

we should fix it in somehow

------------------------------------------------------------------------
[2016-03-25 01:18:34] requinix@php.net

https://3v4l.org/L1s8d - works as expected with this setup.
("header 1" shouldn't appear because its callback was registered after shutdown
already began.)

------------------------------------------------------------------------
[2016-03-24 16:30:48] david at grudl dot com

Description:
------------
register_shutdown_function() inside header_register_callback() is not working https://3v4l.org/YHam1

Test script:
---------------
<?php

header_register_callback(function () {
	echo 'header';
	register_shutdown_function(function () {
		echo 'shutdown';
	});
});

Expected result:
----------------
writes "header shutdown"

Actual result:
--------------
writes "header"


------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=71891&edit=1


Thread (4 messages)

« previous php.bugs (#200085) next »