array_keys_basic.phpt 467 B

123456789101112131415161718192021222324252627
  1. --TEST--
  2. Test array_keys() function (basic)
  3. --FILE--
  4. <?php
  5. echo "*** Testing array_keys() on basic array operation ***\n";
  6. $basic_arr = array("a" => 1, "b" => 2, 2.0 => 2.0, -23.45 => "asdasd",
  7. array(1,2,3));
  8. var_dump(array_keys($basic_arr));
  9. echo "Done\n";
  10. ?>
  11. --EXPECTF--
  12. *** Testing array_keys() on basic array operation ***
  13. array(5) {
  14. [0]=>
  15. string(1) "a"
  16. [1]=>
  17. string(1) "b"
  18. [2]=>
  19. int(2)
  20. [3]=>
  21. int(-23)
  22. [4]=>
  23. int(3)
  24. }
  25. Done