A single POST body carries three fields. The array-style name routes PHP into a key-insert helper that bumps the hash-table counters before allocating the key:
=<binary>&a=1&<name>[x]=1
The second allocation exceeds memory_limit, leaving an incomplete bucket counted in $_POST.
Heap grooming plants useful bytes where PHP reads the bucket. A small hash table takes a 320-byte allocation; the 276-byte binary value lands in the same size class.
PHP frees those copies, then a=1 reuses the memory — attacker bytes remain, shaped to look like a value pointing at a fake array.
The fake array holds a destructor callback — the function PHP calls to free each element. The attacker aims it at system() and points the element at a command:
dtor → &system() element → "cmd"
PHP calls the address without checking it, so any native function is reachable.