Forum Moderators: coopster
It does not matter to me since I run my server and OB is ON
But in the case where a user can not access its php.ini it could become handy if the result is similar to OB On.
But again I am not sure that I understand it correctly :)
The most obvious use is to optimize output. I have code at the end of my output that looks like this:
ob_start(); .
.
. $opt = ob_get_contents ( );
ob_end_clean();
if(!$purty )
{
$opt = preg_replace("/(\s+?)¦(<!--.+?-->)/"," ", $opt);
$opt = preg_replace("/\s{2,}/"," ",$opt);
$opt = str_replace("> <","><",$opt);
}
echo $opt; This turns the code into a big ugly stream of optimized text. It allows me to fill my code with comments and formatting without penalty.
It will interfere with JavaScript, however. Since I try to avoid putting a whole lot of JS into my production pages (I do use it for admin, but try to keep it away from my users), this doesn't need to be much of a problem.
NOTE: I should be able to do this:
$opt = preg_replace("/(\s{2,}?)¦(\s*<!--.+?-->\s*)/"," ", $opt); But the regex doesn't quite work, and I'm too lazy to figure it out. regex can be a real brain squeeze.