click below
click below
Normal Size Small Size show me how
Unit 2 PHP Decisions
Functions and control structures for PHP
| Question | Answer |
|---|---|
| parameter | a variable that is passed to a function when it is called, and placed within the parentheses that follow the function name |
| Function | a groups of statements executed as a single unit |
| Function definition | the lines of code that make up a function |
| Function braces | the set of curly braces containing the function statements |
| return statement | returns a value to the statement that called the function. |
| NULL | no value |
| By value | A function parameter that is passed using a local copy of the variable |
| By reference | A function parameter that is passed using reference to the original variable |
| global variable | a variable declared outside a function and is available to all parts of your program |
| local variable | variable declared inside a function and is only available within the function in which it is declared |
| Selection | logical structure used to execute specific programming code if the evaluation of a conditional expression returns a value of TRUE (or FALSE) |
| command block | a group of statements contained within a set of braces |
| nesting | when one decision |
| switch | selection structure which controls program flow and decision making by executing a specific set of statements depending on the value of an expression |
| case label | a specific value that, when it matches the switch statement, expression will execute the statements within the case |
| default label | contains statements that execute when the value returned by the switch statement expression does not match a case label |
| loop | a logical control structure that repeatedly executes a statement or a series of statements |
| definite loop | loop that will repeat the code for a set number of times |
| indefinite loop | loop that will repeat while a specific condition is TRUE or until a specific condition becomes TRUE |
| iteration | each repetition of a looping statement |
| counter | a variable that increments or decrements with each iteration of a loop statement |
| infinite loop | a loop statement that never ends because its conditional expression is never FALSE |