Chapter

Function Pointers

From ComputerScienceOne by Dr Chris Bourke

Concepts

  1. How do omitted arguments match parameters in PHP functions?

    "It would not be possible to invoke getMonthlyPayment() by omitting only the second argument. Providing n arguments will match the first n parameters. Thus, in your function design you should place an

  2. How can functions be assigned to variables and invoked as callbacks?

    "Functions are just pieces of code that reside somewhere in memory just as variables do. Since we can pass variables by reference, it also makes sense that we would do the same with functions. In PHP,

  3. Why might a program need generalized rounding beyond whole numbers?

    "Recall that the standard math library provides a round() function that rounds a number to the nearest whole number. We’ve had need to round to cents as well. We now have"

Function Pointers | ComputerScienceOne | Bifalgorithm | Bifalgorithm