"23", "Rahul" => "22","Ats" => "23");array_pop($Student);print_r(array_change_key_case($Student,"> What will be the output of the following PHP code ?<?php$Student

Home » PHP » PHP Sorting Arrays » Question
  1. What will be the output of the following PHP code ?
    <?php
    $Student = array("Ajit" => "23", "Rahul" => "22","Ats" => "23");
    array_pop($Student);
    print_r(array_change_key_case($Student, CASE_UPPER));
    ?>
    1. Error
    2. Array
      (
      [AJIT] => 23
      )
    3. Nothing
    4. Array
      (
      [AJIT] => 23
      [RAHUL] => 22
      )
    5. None of these
Correct Option: D

The array_change_key_case() function changes all keys in an array to lowercase or uppercase and arry_pop() removes last element.



Your comments will be displayed only after manual approval.