Tag: php
Questions Related to php
How does the identity operator === compare two values?
Under what circumstance is it impossible to assign a default value to a parameter while declaring a function?
Choose the appropriate function declaration for the user-defined function is_leap(). Assume that, if not otherwise defined, the is_leap function uses the year 2000 as a default value:
{ $is_leap = (!($year %4) && (($year % 100) || !($year % 400))); return $is_leap; }var_dump(is_leap(1987)); /* Displays false / var_dump(is_leap()); / Displays true */
What is the best way to iterate through the $myarray array, assuming you want to modify the value of each element as you do?
$myarray = array ("My String","Another String","Hi, Mom!");