Why does this PHP variable variable overwrite globals?

Why does this PHP variable variable overwrite globals in a mapper. The PHP code uses variable variables from user input. In PHP apps this can overwrite trusted variables and escalate privileges.

#whatswrongwiththisphpcode #phpbug #phpproductionbug #phpdebugging #phpbackend #phpcodereview #phpsecurity #phpperformance #phpreliability #phpapi #phpwebdevelopment #phpengineering #phpvariablevariab...

https://www.youtube.com/watch?v=j1Ngsi0TJ6U

Why does this PHP variable variable overwrite globals? #phpglobals

YouTube