This is how you find UAF vulnerabilities:
Provide an input that causes the application to crash or misbehave. E.g. by fuzzing or an ...
How we broke PHP, hacked Pornhub and earned $20,000
We have found two use-after-free vulnerabilities in PHP’s garbage collection algorithm.
Those vulnerabilities were remotely exploitable over PHP’s unserialize function.
Your question is incorrect on many levels.