How does PHP handle the assignment of a variable by reference when the original variable is unset?

PHP Intermediate Hard

PHP Intermediate — Hard

How does PHP handle the assignment of a variable by reference when the original variable is unset?

Key points

  • Unset removes the symbol, not the value
  • References point to the same zval container
  • Memory is freed only when the reference count reaches zero

Ready to go further?

Related questions