A.php
define("_a_","hey!");
B.php
define("_a_","wow!");
index.php
function getFile($type) {
include_once($type . ".php");
echo _a_;
}
Calling getFile
getFile(A); //--> Output "hey!"
getFile(B); //--> Output "hey!" HERE IS THE PROBLEM, SHOULD ECHO "wow!"
Then I exchanged the order of calling functions
getFile(B); //--> Output "wow!"
getFile(A); //--> Output "wow!" HERE IS THE PROBLEM, SHOULD ECHO "hey!"
Thanks for all helps