Browse Source

- Added ob_get_level, which returns the nesting level of the output buffering

mechanism. (patch by Yasuo Ohgaki <yasuo_ohgaki@yahoo.com>)
@- Added ob_get_level, which returns the nesting level of the output buffering
@  mechanism. (Yasuo, Derick)
experimental/ZendEngine2
Derick Rethans 24 years ago
parent
commit
1f14640b3e
  1. 1
      ext/standard/basic_functions.c
  2. 8
      main/output.c
  3. 1
      main/php_output.h

1
ext/standard/basic_functions.c

@ -725,6 +725,7 @@ function_entry basic_functions[] = {
PHP_FE(ob_end_flush, NULL)
PHP_FE(ob_end_clean, NULL)
PHP_FE(ob_get_length, NULL)
PHP_FE(ob_get_level, NULL)
PHP_FE(ob_get_contents, NULL)
PHP_FE(ob_implicit_flush, NULL)

8
main/output.c

@ -575,6 +575,14 @@ PHP_FUNCTION(ob_get_contents)
}
/* }}} */
/* {{{ proto integer ob_get_level(void)
Return the nesting level of the output buffer */
PHP_FUNCTION(ob_get_level)
{
RETURN_LONG (OG(ob_nesting_level));
}
/* }}} */
/* {{{ proto string ob_get_length(void)
Return the length of the output buffer */
PHP_FUNCTION(ob_get_length)

1
main/php_output.h

@ -49,6 +49,7 @@ PHP_FUNCTION(ob_end_flush);
PHP_FUNCTION(ob_end_clean);
PHP_FUNCTION(ob_get_contents);
PHP_FUNCTION(ob_get_length);
PHP_FUNCTION(ob_get_level);
PHP_FUNCTION(ob_implicit_flush);
typedef struct _php_ob_buffer {

Loading…
Cancel
Save