In PHP, variable allocation is really easy, you don’t really need to know how memory is managed to use the language. But if you want to be a good programmer, you NEED to know what happens when you write “$var = 10;”

http://blog.thedebian.com/post/79117048456/what-happens-when-i-allocate-a-php-variable