Closed peter279k closed 5 years ago
There is a good explaination on SO.
In a nutshell
I've used unset
because I really don't need the variable anymore and I wanted to clean up everything.
Within a test it does't really matter, because the PHP garbage collector will clean it up anyway.
Closed via current explanation :).
As title, it seems that the
SplFileObject
andSplFileInfo
will let them be null after using them are done.It seems that the
ImageTypeDetector
class uses theunset
to release theSplFileObject
variable.But the
SplFileInfo
variable does not inImageTypeDetectorTest
class.BTW, using the
unset
or assigningnull
is same as closing file handler.Which one we prefer using in this repository?