'; } // Call a function greet(); // Although the interpreter runs the script from top to bottom, // a function call can appear before thefunction definition. // That is not good programming practice, however, so you should // define functions before they are called. // Functions may ontain any valid PHP script code and may even // contain a another function definition. // In that case, the inner function will not exist until the outer function // has been called. // Thus, consider the following example function, outer() must be called // before inner() can be called // Define another function that contains an inner function definition and a further statement function outer() { function inner() { echo 'Inner function called.
'; } echo 'Inner function created.
'; } outer(); inner(); ?>