Why would someone use ob_start in this manner and what is the point?
Posted
by
meder
on Stack Overflow
See other posts from Stack Overflow
or by meder
Published on 2011-01-06T22:04:33Z
Indexed on
2011/01/07
1:54 UTC
Read the original article
Hit count: 444
php
Something is failing in the class I copied over. It's not my class, but the relevant bit that fails is:
class foo {
function process() {
ob_start( array( &$this, 'parseTemplate' ) );
}
function parseTemplate(){}
}
Does anyone know what the ob_start
expression is supposed to do? Call the parse_template
method in the context of a copy of &$this
? PHP Version is 5.3.2-1
. I suspect that the class was coded for 5.0-5.2 and it breaks in 5.3? or could it be something else?
© Stack Overflow or respective owner