PHP Arrays
What will be the output of the following php code?
$states = array("karnataka" => array( "population" => "11,35,000", "captial" => "Bangalore"),"Tamil Nadu" => array( "population" => "17,90,000","captial" => "Chennai") );
echo $states["karnataka"]["population"];

population 11,35,000
karnataka population
karnataka 11,35,000
11,35,000

ANSWER DOWNLOAD EXAMIANS APP

PHP Arrays
What array will you get if you convert an object to an array?

An array with keys of that object as the array's elements
An array with properties of that object as the Key elements
An array with properties of that object as the array's elements
An array with properties of that array as the object's elements

ANSWER DOWNLOAD EXAMIANS APP

PHP Arrays
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 PHP must monitor the execution of the function to determine if changes are made to the array.
No
Yes, because the interpreter must always create a copy of the array before passing it to the function.
Yes, but only if the array is large.
Yes, but only if the function modifies the contents of the array.

ANSWER DOWNLOAD EXAMIANS APP

PHP Arrays
What will be the output of the following PHP code?
$face = array ("A", "J", "Q", "K");
$number = array ("2","3","4", "5", "6", "7", "8", "9", "10");
$cards = array_merge ($face, $number);
print_r ($cards);

Array ( [0] => A [1] => J [2] => Q [3] => K [4] => 2 [5] => 3 [6] => 4 [7] => 5 [8] => 6 [9] => 7 [10] => 8 [11] => 9 [12] => 10 )
Error
Array ( [0] => 2 [1] => 3 [2] => 4 [3] => 5 [4] => 6 [5] => 7 [6] => 8 [7] => 9 [8] => 10 [9] => A [10] => J [11] => Q [12] => K )
Array ( [0] => A [1] => 2 [2] => J [3] => 3 [4] => Q [5] => 4 [6] => K [7] => 5 [8] => 6 [9] => 7 [10] => 8 [11] => 9 [12] => 10 )

ANSWER DOWNLOAD EXAMIANS APP