unset() – destroy specified values
explode() return array of string
This morning I was reading through a article about the performance when we include files in php using require and require_once.
So the in brief what I conclude:
include – includes and evaluates, if file not found a warning is given, allows the script to continue.
require – first stats the file and brings the file, script will die if the file is not found or user doesnt have access to it.
include_once – goes through the entire loaded files to make sure the the file hasnt beed uploaded and then loads it.
require_once – stats the file, looks through entire loaded files and if it has been included, not to include it again.
Considering the performance, then include_once and require_once will take bit of time because they have to look through the entire directory before loading the files. However require_once is safer which will not allow you to include a file more then once which can cause erros.
To tune up the performance php has auto loading class which automatically called in case you are trying to use a class or interface which has not been defined yet.