Loading video...
Variable-Length Parameter Lists
- User-defined functions are permitted to accept a variable number of parameters.
- PHP provides the built-in functions func_num_args() , func_get_arg() , and func_get_args() for working with user-defined functions that accept a variable number of parameters.
- These functions interpret the parameter list as being zero-indexed, meaning that the 1st argument supplied to a function is argument 0.
- PHP provides several functions for testing the data type of a particular
variable:
- is_int()
- is_float()
- is_string()
- is_bool()
- is_array()
- is_null()
- is_numeric()
- Additional Resources:
Variable-Length Parameter Lists
Lecture Slides are screen-captured images of important points in the lecture. Students can download and print out these lecture slide images to do practice problems as well as take notes while watching the lecture.
- Intro
- Lesson Overview
- Variable-Length Parameter Lists
- Variable-Length Parameter Lists (cont.)
- Variable Type Functions
- is_int (), is_float (), is_string (), and is_bool()
- is_ array ()
- is_null ()
- Variable Type Functions Coding Example 1
- is_numeric() and Example
- Variable Type Functions Coding Example 2
- Homework Challenge
- Homework Challenge (cont.)


































Start Learning Now
Our free lessons will get you started (Flash® 10 required).
Sign up for Educator.comGet immediate access to our entire library.
Features Overview