PHP 메모리 사용량 측정

1 개요[ | ]

PHP 메모리 사용량 측정
  • measure_memory.php
<?php
$start_memory = memory_get_usage();

$a = str_repeat("1234567890", 10000);

$end_memory = memory_get_usage();
echo ($end_memory - $start_memory).PHP_EOL;
root@zetawiki:~# php measure_memory.php 
100296

2 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}