PHP_FUNCTION(ob_end_flush);
PHP_FUNCTION(ob_end_clean);
PHP_FUNCTION(ob_get_contents);
+PHP_FUNCTION(ob_implicit_flush);
static void php_output_init_globals(OLS_D)
PHP_FE(ob_end_flush, NULL)
PHP_FE(ob_end_clean, NULL)
PHP_FE(ob_get_contents, NULL)
+ PHP_FE(ob_implicit_flush, NULL)
{NULL, NULL, NULL}
};
PHPAPI void php_start_implicit_flush()
{
- php_end_ob_buffering(1); /* Switch out of output buffering if we're in it */
+ OLS_FETCH();
+ php_end_ob_buffering(1); /* Switch out of output buffering if we're in it */
+ OG(implicit_flush)=1;
}
PHPAPI void php_end_implicit_flush()
{
+ OLS_FETCH();
+
+ OG(implicit_flush)=0;
}
free(newstr);
}
+ if (OG(implicit_flush)) {
+ sapi_flush();
+ }
return result;
}
flag = (*zv_flag)->value.lval;
break;
}
+ if (flag) {
+ php_start_implicit_flush();
+ } else {
+ php_end_implicit_flush();
+ }
}
PHP_FUNCTION(ob_end_flush);
PHP_FUNCTION(ob_end_clean);
PHP_FUNCTION(ob_get_contents);
+PHP_FUNCTION(ob_implicit_flush);
static void php_output_init_globals(OLS_D)
PHP_FE(ob_end_flush, NULL)
PHP_FE(ob_end_clean, NULL)
PHP_FE(ob_get_contents, NULL)
+ PHP_FE(ob_implicit_flush, NULL)
{NULL, NULL, NULL}
};
PHPAPI void php_start_implicit_flush()
{
- php_end_ob_buffering(1); /* Switch out of output buffering if we're in it */
+ OLS_FETCH();
+ php_end_ob_buffering(1); /* Switch out of output buffering if we're in it */
+ OG(implicit_flush)=1;
}
PHPAPI void php_end_implicit_flush()
{
+ OLS_FETCH();
+
+ OG(implicit_flush)=0;
}
free(newstr);
}
+ if (OG(implicit_flush)) {
+ sapi_flush();
+ }
return result;
}
flag = (*zv_flag)->value.lval;
break;
}
+ if (flag) {
+ php_start_implicit_flush();
+ } else {
+ php_end_implicit_flush();
+ }
}