<?php // define a function function Response { echo "Have a good day!<br /><br />"; } // driving to work echo "Are you going to merge? <br />"; Response; // at the office echo "I need a status report on all your projects in the next 10 minutes for my management meeting.<br />"; Response; // at the pub after work echo "Did Bill get everything he needed today? He was sure crabby!<br />"; Response; ?>
Question 5-2.
Define a function called toast that takes minutes as a parameter. The function prints "done."
Question 5-3.
Call the toast function with 5 as a parameter.
Question 5-4.
What's the difference between using include() and require()?
Question 5-5.
What is a function called when it is part of a class?
See the Appendix for the answers to these questions.