M4 Flashcards
used to declare constants
define()
can only be assigned a scalar value, like a string or a number
constant
T/F A constant’s value can still be changed.
False
You can separate your PHP file and embed it to your html by using PHP __________ functions
include
Includes and evaluates the specified file.
Generate a warning on failure message if file not found.
include
Performs the same way as the include function.
Generate a fatal error message if file not found stopping the script at that point.
require
Same as include function except it includes the file only once.
include_once
Same as require function except it includes the file only once.
require_once
Most of the developers used include functions for their ________ and _________
header, footer
You may write the file with an extension name of ________ rather than .php to serve as a fragment of your program code.
.inc
T/F In some scripts, a file might be included more than once, causing function redefinitions, variable reassignments, and
other possible problems.
True
function used to generate random integers
rand()
function that returns the next highest integer by rounding the value upwards
ceil()
function that returns the next lowest integer by rounding the value downwards
floor()
function that returns the smallest value
min()
function that returns the highest value
max()
function that formats a number (with grouped thousand)
number_format()
function that destroys the specified variable
unset
function that splits a string by string
explode
function that joins array elements to form a string
implode
function that returns the value length of a string
strlen
function that finds the position of the first occurrence of a substring in a given string
strpos
function that reverses a given string
strrev
function that converts string to lowercase
strtolower
function that converts string to uppercase
strtoupper
function that returns part of a given string
substr
function that makes a string’s first character uppercase
ucfirst()
converts string to uppercase*
ucwords()