1.  What will be the output of the following PHP code ?
$fruits = array (‘’website’’, ‘’print’’, ‘’exam’’);
echo (next($fruits));
echo (next($fruits));
?>


printexam
websiteprint
printprint
websitewebsite


Answer

 Option

The next() function returns the array value residing at the position immediately following that of the current array pointer.

Workspace

Report
Mail id: Report Error:

Answer Workspace Report

2.  Which function can be used to move the pointer to the previous array position ?


last()
before()
prev()
previous()


Answer

 Option

No answer description available for this question.

Workspace

Report
Mail id: Report Error:

Answer Workspace Report

3.  What will be the output of the following PHP code ?
$people = array(‘‘Peter’‘, ‘‘Susan’‘, ‘‘Edmund’‘, ‘‘Lucy’‘);
echo pos($people);
?>


Lucy
Peter
Susan
Edmund


Answer

 Option

The pos() function returns the value of the current element in an array, and since no operation has been done, the current element is the first element.

Workspace

Report
Mail id: Report Error:

Answer Workspace Report

4.  There are three different kind of arrays:


Numeric array, String array, Multidimensional array
Numeric array, Associative array, Dimensional array
Numeric array, Associative array, Multidimensional array
Const array, Associative array, Multidimensional array


Answer

 Option

No answer description available for this question.

Workspace

Report
Mail id: Report Error:

Answer Workspace Report

5.  Absent any actual need for choosing one method over the other, does passing arrays by value to a read-only function reduce performance compared to passing them by reference ?


Yes, because the interpreter must always create a copy of the array before passing it to the function.
Yes, but only if the function modifies the contents of the array.
Yes, but only if the array is large.
No


Answer

 Option

No answer description available for this question.

Workspace

Report
Mail id: Report Error:

Answer Workspace Report