Garbage collection in PHP refers to allocating and deallocating of space due to repeated use of a program. Many times, unnecessary space is consumed when a resource is orphaned after being used. The garbage collector in PHP ensures that these kinds of unwanted space consumption are minimized.
BY Best Interview Question ON 06 Jul 2020