Lubinik Learning

Training mode

PHP Functions, Arrays & Errors

Time remaining:

0 / 20 answered

  1. 1. What is a function parameter?

    What is a function parameter?
    Hint

    Focus on the responsibility of the language feature rather than memorizing punctuation.

  2. 2. What is a function argument?

    What is a function argument?
    Hint

    Focus on the responsibility of the language feature rather than memorizing punctuation.

  3. 3. What does a default parameter value allow?

    What does a default parameter value allow?
    Hint

    Focus on the responsibility of the language feature rather than memorizing punctuation.

  4. 4. What is the practical difference between return and echo?

    What is the practical difference between return and echo?
    Hint

    Focus on the responsibility of the language feature rather than memorizing punctuation.

  5. 5. By default, can a function directly use a variable declared outside it?

    By default, can a function directly use a variable declared outside it?
    Hint

    Focus on the responsibility of the language feature rather than memorizing punctuation.

  6. 6. What does the global keyword do inside a function?

    What does the global keyword do inside a function?
    Hint

    Focus on the responsibility of the language feature rather than memorizing punctuation.

  7. 7. What does isset( $value ) check?

    What does isset( $value ) check?
    Hint

    Focus on the responsibility of the language feature rather than memorizing punctuation.

  8. 8. When does empty( $value ) return true?

    When does empty( $value ) return true?
    Hint

    Focus on the responsibility of the language feature rather than memorizing punctuation.

  9. 9. What does count( $items ) return for an array?

    What does count( $items ) return for an array?
    Hint

    Focus on the responsibility of the language feature rather than memorizing punctuation.

  10. 10. What does in_array( $needle, $haystack, true ) do?

    What does in_array( $needle, $haystack, true ) do?
    Hint

    Focus on the responsibility of the language feature rather than memorizing punctuation.

  11. 11. How does array_key_exists() differ from isset() for an array key containing null?

    How does array_key_exists() differ from isset() for an array key containing null?
    Hint

    Focus on the responsibility of the language feature rather than memorizing punctuation.

  12. 12. What is array_map() commonly used for?

    What is array_map() commonly used for?
    Hint

    Focus on the responsibility of the language feature rather than memorizing punctuation.

  13. 13. What is array_filter() commonly used for?

    What is array_filter() commonly used for?
    Hint

    Focus on the responsibility of the language feature rather than memorizing punctuation.

  14. 14. What does array_merge() do?

    What does array_merge() do?
    Hint

    Focus on the responsibility of the language feature rather than memorizing punctuation.

  15. 15. Why use asort() instead of sort() for an associative array?

    Why use asort() instead of sort() for an associative array?
    Hint

    Focus on the responsibility of the language feature rather than memorizing punctuation.

  16. 16. What is a PHP callback?

    What is a PHP callback?
    Hint

    Focus on the responsibility of the language feature rather than memorizing punctuation.

  17. 17. What is an anonymous function?

    What is an anonymous function?
    Hint

    Focus on the responsibility of the language feature rather than memorizing punctuation.

  18. 18. What is the purpose of try and catch?

    What is the purpose of try and catch?
    Hint

    Focus on the responsibility of the language feature rather than memorizing punctuation.

  19. 19. What does error_log() help a developer do?

    What does error_log() help a developer do?
    Hint

    Focus on the responsibility of the language feature rather than memorizing punctuation.

  20. 20. Why add parameter and return type declarations?

    Why add parameter and return type declarations?
    Hint

    Focus on the responsibility of the language feature rather than memorizing punctuation.