a PHP script.
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 2006, PHP 5.2.0
+- Added memory_get_peak_usage() function for retrieving peak memory usage of
+ a PHP script. (Ilia)
- Changed Apache 2 Handler SAPI to call ap_set_content_type() once only. (Mike)
- Changed E_ALL error reporting mode to includes E_RECOVERABLE_ERROR. (Marcus)
- Added control character checks for cURL extension's open_basedir/safe_mode
PHP_FE(print_r, NULL)
#if MEMORY_LIMIT
PHP_FE(memory_get_usage, NULL)
+ PHP_FE(memory_get_peak_usage, NULL)
#endif
PHP_FE(register_shutdown_function, NULL)
PHP_FUNCTION(unserialize);
#if MEMORY_LIMIT
PHP_FUNCTION(memory_get_usage);
+PHP_FUNCTION(memory_get_peak_usage);
#endif
PHPAPI void php_var_dump(zval **struc, int level TSRMLS_DC);
RETURN_LONG(AG(allocated_memory));
}
/* }}} */
+/* {{{ proto int memory_get_peak_usage()
+ Returns the peak allocated by PHP memory */
+PHP_FUNCTION(memory_get_peak_usage) {
+ RETURN_LONG(AG(allocated_memory_peak));
+}
+/* }}} */
#endif
/*