티스토리 뷰

개발/PHP

[php] memory 정보 관련..

Jaeyeon Baek 2012. 4. 23. 12:46

※ memory_get_usage

(PHP 4 >= 4.3.2, PHP 5)

memory_get_usage -- Returns the amount of memory allocated to PHP

Description

int memory_get_usage ( void )

Returns the amount of memory, in bytes, that's currently being allocated to your PHP script.

memory_get_usage() will only be defined if your PHP is compiled with the --enable-memory-limit configuration option.

 

 

※ ini_set('memory_limit', '..M')

(PHP 4, PHP 5)

ini_set -- Sets the value of a configuration option

Description

string ini_set ( string varname, string newvalue )

Sets the value of the given configuration option. Returns the old value on success, FALSE on failure. The configuration option will keep this new value during the script's execution, and will be restored at the script's ending.

Not all the available options can be changed using ini_set(). There is a list of all available options in the appendix.

'개발 > PHP' 카테고리의 다른 글

[php] 수상한 php 배열 메모리 관련...  (0) 2012.09.26
[php] (split) VS (explode)  (0) 2012.09.26
[php] implode, explode  (0) 2011.11.28
[php] array_fill() - 배열 초기화  (0) 2011.11.27
[php] print_r( mixed expression [, bool return] )  (0) 2011.11.13
댓글
최근에 올라온 글
최근에 달린 댓글
글 보관함
Total
Today
Yesterday