for memory_get_usage, change checking routine from version compare to function exist

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6852 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
haneul 2009-10-12 11:51:44 +00:00
parent 62af563fc8
commit f2deebf529

View file

@ -499,7 +499,7 @@
if(__DEBUG_OUTPUT__ == 2 && version_compare(PHP_VERSION, '6.0.0') === -1) {
if(!isset($firephp)) $firephp = FirePHP::getInstance(true);
if(version_compare(PHP_VERSION, "4.3.2", ">="))
if(function_exists("memory_get_usage"))
{
$label = sprintf('[%s:%d] (m:%s)', $file_name, $line_num, FileHandler::filesize(memory_get_usage()));
}
@ -521,7 +521,7 @@
} else {
$debug_file = _XE_PATH_.'files/_debug_message.php';
if(version_compare(PHP_VERSION, "4.3.2", ">="))
if(function_exists("memory_get_usage"))
{
$debug_output = sprintf("[%s %s:%d] - mem(%s)\n%s\n", date('Y-m-d H:i:s'), $file_name, $line_num, FileHandler::filesize(memory_get_usage()), print_r($debug_output, true));
}