I would like to have the freedom of redeclaring particular functions in PHP. In another words, I have script that includes some files:
include_once(dirname(__FILE__) . '/../drupal/includes/bootstrap.inc');
include_once(dirname(__FILE__) . '/../drupal/includes/common.inc');
Later on in this script execution depending on some conditions, it is clear we need to load all application and not only particular files, however. This causes the error of redeclaration because when bootstrapping full App some of the functions were already included at beginning(i.e. bootstrap.inc, common.inc). What is solution? Can a remove an imported file before including it again to avoid redeclaration error? Can i have control on deciding when its okey to redeclare and when not in PHP? Thank you for help