Section 5.4. Chapter 5 Questions


5.4. Chapter 5 Questions


Question 5-1.

What's wrong with this function call?

 <?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.



Learning PHP and MySQL
Learning PHP and MySQL
ISBN: 0596101104
EAN: 2147483647
Year: N/A
Pages: 135

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net