Here is my code:
echo memory_get_usage() . "\n";
// My PHP code is here.
echo memory_get_usage() . "\n";
The first line always echos 125800 and second line echos something variable around 129448. So, does this mean all my PHP scripts will use 125800 Bytes of RAM at the least and depending on the demand it can go up as needed?
**Update - **
I read this question. Here is a quote from accepted answer
When looking at your memory usage, you must look at the memory that is being used by the interpreter as well. Look at the big picture. The number being given to you by memory_get_usage() is the correct number.
My question is if the same script is run multiple times does the memory allocated for each script is 129448 Bytes or does the interpreter takes just one time memory of 125800 and more instances of the script run on 129448 - 125800 Bytes of memory.