ID:               33974
 User updated by:  php at koterov dot ru
 Reported By:      php at koterov dot ru
 Status:           Bogus
 Bug Type:         Output Control
 Operating System: any
 PHP Version:      4.3.11
 New Comment:

Very strange, because object-based callbacks works fine with
ob_start(). So I guess that full callback info is stored somewhere.

OK, debug purpose. But - maybe write it explicitly in documentation?
"This function is for debug purposes only. Do not try to use it for
manual callback execution - references will be wrong for object-based
callbacks."


Previous Comments:
------------------------------------------------------------------------

[2005-08-03 15:46:05] [EMAIL PROTECTED]

This is how the engine stores callbacks names.
ob_list_handlers() has nothing to do with it. 
This functions is for debugging purposes only and there is nothing said
in the docs that it should return valid callbacks.

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

[2005-08-03 15:35:21] php at koterov dot ru

There is nothing said about this behaviour in the documentation:

http://www.php.net/manual/ru/function.ob-list-handlers.php

And - if I cannot trust the result of ob_list_handlers() (I cannot - it
returns bogus handler names), is this function necessary at all?

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

[2005-08-03 13:22:51] [EMAIL PROTECTED]

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php



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

[2005-08-03 12:35:45] php at koterov dot ru

Description:
------------
Seems ob_list_handlers() cannot return handlers represented as object
with method names (see ob_start(array(&$obj, 'F'))). It returns them as
"ClassName::MethodName", not as array(..., ...).

Reproduce code:
---------------
<?php
class C { function F($s) { return $s; } }
$obj = new C();
ob_start(array(&$obj, 'F'));
$list = ob_list_handlers();
var_dump($list);
?>

Expected result:
----------------
array(1) { [0]=>  array(..., 'F') }
// where "..." is object $obj

Actual result:
--------------
array(1) { [0]=>  string(4) "c::F" }


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


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

Reply via email to