anikwa Posted May 26, 2013 Share Posted May 26, 2013 Hi. I'm writing my own php framework for a couple of projects I'm doing and I'm currently writing the Render/Template class and I'm debating the use of ob_start(). Are there any practical benefits to using this? Link to comment https://forums.phpfreaks.com/topic/278404-output-buffering/ Share on other sites More sharing options...
jcbones Posted May 26, 2013 Share Posted May 26, 2013 IMHO, output bufferings only good use is to cover up bad coding practices. Link to comment https://forums.phpfreaks.com/topic/278404-output-buffering/#findComment-1432395 Share on other sites More sharing options...
anikwa Posted May 26, 2013 Author Share Posted May 26, 2013 What do you mean by that? Link to comment https://forums.phpfreaks.com/topic/278404-output-buffering/#findComment-1432419 Share on other sites More sharing options...
trq Posted May 27, 2013 Share Posted May 27, 2013 There are plenty of benefits to using buffers in the context of template rendering. Having the ability to load template data into a specific scope without it displaying there and then is one of them. Link to comment https://forums.phpfreaks.com/topic/278404-output-buffering/#findComment-1432452 Share on other sites More sharing options...
ignace Posted May 27, 2013 Share Posted May 27, 2013 Indeed output buffering is not a bad coding practice at all. That said certain PHP installations even have automatic output buffering enabled without having to write ob_start() anywhere. http://be2.php.net/manual/en/outcontrol.configuration.php#ini.output-buffering Link to comment https://forums.phpfreaks.com/topic/278404-output-buffering/#findComment-1432575 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.