Enter your Sign-on user name and password.

Forgot password?
  • Follow us on:
Loading video...

Start Learning Now

Our free lessons will get you started (Flash® 10 required).
Get immediate access to our entire library.

Sign up for Educator.com

Features Overview

  • Get on-demand access to our complete library
  • Search and jump to exactly what you need to learn
  • Track your progress
  • Download practice and lesson files
  • *Ask questions and get answers from our community & instructors

User-Defined Functions

  • Defining a function requires four parts:
    • the function keyword
    • a function identifier
    • a function parameter list
    • a function statement group, or ‘function body’
  • Function parameters are variables defined in a function’s definition that can be used within the function’s body. They are initialized by arguments passed to the function each time it is called.
  • Return values of functions are specified using a return statement.
  • Return values can be of any PHP data type. If a return statement is never executed within a function, NULL is returned.
  • The include_once construct functions exactly as an include statement, except that if the file specified has already been included it will not be included again. require_once functions like a combination of include_once and require .
  • Additional Resources:

User-Defined Functions

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.

Computer Science: Introduction to PHP