Programming Languages PHP Objective
Sep 23, 2025

Which PHP function is used to get the memory usage of a specific variable?

Choose the correct answer:
A) memory_get_usage()
B) memory_get_peak_usage()
C) get_memory_usage()
D) There is no built-in function for this
Detailed Explanation

Explanation: PHP does not have a built-in function to get memory usage of a specific variable. memory_get_usage() returns total memory usage, and memory_get_peak_usage() returns peak memory usage, but not for individual variables.

Discussion (0)

No comments yet. Be the first to share your thoughts!

Share Your Thoughts
Feedback