From:             aleksandr dot makov at gmail dot com
Operating system: Any
PHP version:      Irrelevant
Package:          Output Control
Bug Type:         Feature/Change Request
Bug description:Ability to reference an active output buffer stack.

Description:
------------
Since we have ob_get_level() we kind of miss ability to reference that
stack from 
nested active stacks. In recursive content generators this will avoid the
need to 
loop through the final output to determine the bounds of nested stacks and
do 
operations with that(those) segment(s), such as replacement and so on.

Test script:
---------------
ob_start();
echo "111"; // <-- this is the stack of interest
ob_start();
echo "22";
ob_start();
echo "3";
$cur_stack_len = ob_get_length(); // length of current stack (level 3) is
1
$top_stack_len = get_length_of_ob_stack_by_level(1); // expected length
here should be 3 (strlen("111") == 3)
ob_end_clean();
ob_end_clean();
echo "some more chars to change length of stack 1";
ob_end_clean();
echo $top_stack_len; // I'm expecting to see 3 here.

Expected result:
----------------
3

Actual result:
--------------
not implemented

-- 
Edit bug report at https://bugs.php.net/bug.php?id=64212&edit=1
-- 
Try a snapshot (PHP 5.4):   
https://bugs.php.net/fix.php?id=64212&r=trysnapshot54
Try a snapshot (PHP 5.3):   
https://bugs.php.net/fix.php?id=64212&r=trysnapshot53
Try a snapshot (trunk):     
https://bugs.php.net/fix.php?id=64212&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=64212&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=64212&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=64212&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=64212&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=64212&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=64212&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=64212&r=notwrong
Not enough info:            
https://bugs.php.net/fix.php?id=64212&r=notenoughinfo
Submitted twice:            
https://bugs.php.net/fix.php?id=64212&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=64212&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=64212&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=64212&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=64212&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=64212&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=64212&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=64212&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=64212&r=mysqlcfg

Reply via email to