Skip to content

Instantly share code, notes, and snippets.

@nhalstead
Last active February 2, 2020 18:17
Show Gist options
  • Save nhalstead/37aab0daecf63c73a142819a568b710c to your computer and use it in GitHub Desktop.
Save nhalstead/37aab0daecf63c73a142819a568b710c to your computer and use it in GitHub Desktop.
Get PHP Memory Usage (of the current request).
<?php
echo round(memory_get_usage() / 1024 / 1024, 2) . ' MB';
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment