php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #33973 using ob_start(create_function(...)): will not show up in ob_list_handlers()
Submitted: 2005-08-03 12:30 UTC Modified: 2005-08-03 18:18 UTC
From: php at koterov dot ru Assigned:
Status: Closed Package: Documentation problem
PHP Version: 5CVS, 4CVS (2005-08-03) OS: *
Private report: No CVE-ID: None
 [2005-08-03 12:30 UTC] php at koterov dot ru
Description:
------------
Seems ob_list_handlers() cannot work with functions created dynamically using create_function(). "default output handler" is returned.

Reproduce code:
---------------
<?php
ob_start(create_function('$s', 'return $s;'));
$list = ob_list_handlers();
var_dump($list);
?>

Expected result:
----------------
array(1) { [0]=>  string(...) "name of dynamically created function" }

Actual result:
--------------
array(1) { [0]=>  string(22) "default output handler" }

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-08-03 15:24 UTC] sniper@php.net
Anonymous is anonymous. Need to document this though.

 [2005-08-03 18:18 UTC] nlopess@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.


 [2020-02-07 06:11 UTC] phpdocbot@php.net
Automatic comment on behalf of nlopess
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=a9264c30dc1be6b38e8f090523fae99600996711
Log: fix #33973: output with anonymous functions
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Jul 08 16:01:33 2025 UTC