summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/standard/basic_functions.c2
-rw-r--r--main/output.c16
-rw-r--r--main/php_output.h2
3 files changed, 20 insertions, 0 deletions
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c
index 923a187796..4d2d5f50e7 100644
--- a/ext/standard/basic_functions.c
+++ b/ext/standard/basic_functions.c
@@ -720,6 +720,8 @@ function_entry basic_functions[] = {
/* functions from output.c */
PHP_FE(ob_start, NULL)
+ PHP_FE(ob_flush, NULL)
+ PHP_FE(ob_clean, NULL)
PHP_FE(ob_end_flush, NULL)
PHP_FE(ob_end_clean, NULL)
PHP_FE(ob_get_length, NULL)
diff --git a/main/output.c b/main/output.c
index f03f15af23..92f2ef2d3d 100644
--- a/main/output.c
+++ b/main/output.c
@@ -533,6 +533,22 @@ PHP_FUNCTION(ob_start)
}
/* }}} */
+/* {{{ proto void ob_flush(void)
+ Flush (send) the output buffer */
+PHP_FUNCTION(ob_flush)
+{
+ php_end_ob_buffer(1, 1 TSRMLS_CC);
+}
+/* }}} */
+
+/* {{{ proto void ob_clean(void)
+ Clean (erase) the output buffer */
+PHP_FUNCTION(ob_clean)
+{
+ php_end_ob_buffer(0, 1 TSRMLS_CC);
+}
+/* }}} */
+
/* {{{ proto void ob_end_flush(void)
Flush (send) the output buffer, and turn off output buffering */
PHP_FUNCTION(ob_end_flush)
diff --git a/main/php_output.h b/main/php_output.h
index f489532b0b..e8d1f2f7b0 100644
--- a/main/php_output.h
+++ b/main/php_output.h
@@ -43,6 +43,8 @@ PHPAPI int php_get_output_start_lineno(TSRMLS_D);
PHPAPI void php_ob_set_internal_handler(php_output_handler_func_t internal_output_handler, uint buffer_size TSRMLS_DC);
PHP_FUNCTION(ob_start);
+PHP_FUNCTION(ob_flush);
+PHP_FUNCTION(ob_clean);
PHP_FUNCTION(ob_end_flush);
PHP_FUNCTION(ob_end_clean);
PHP_FUNCTION(ob_get_contents);