php全局变量不起作用

Good morning everyone! I have a php project that I'm working on and can't figure out why the global variable is not working correctly. The project uses several files as laid out below:

main.php

...
function externalCall() {
  if (! call_user_func('second_function')) {
    ...
  }
}
...
externalCall();

second.php

$MODULE='second';
...
echo ':'.$MODULE.':';
...
function second_function() {
    global $MODULE;
    echo ':'.$MODULE.':';
}

Now the 'echo' statement in the 'second_function' just prints a null value instead of the assigned value 'second', whereas the preceeding 'echo' prints out 'second' correctly. Any thoughts as to why this is happening?