PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
There is a constructor that execute first before require/include function? like __constructor in class...
purpose:
I want to call a function inside the phpfile.php before or upon execution of require('phpfile.php'); to load all the initial variables needed by all php file.
When you include / require a file, you are essentially adding all of the code from that file into the current one, so all you have done is made the function available to the first file, not created a constant.