menu

PHP Functions


1. Which PHP function is used to create an array?

array()

create_array()

make_array()

build_array()


2. Which PHP function is used to check if a variable is empty?

empty()

is_empty()

check_empty()

var_empty()


3. Which PHP function is used to check if a file exists?

file_exists()

exists_file()

check_file()

file_check()


4. Which of the following is a built-in PHP function that returns the length of a string?

strlen()

str_length()

stringlen()

strsize()


5. Which PHP function is used to remove elements from an array?

unset()

remove()

delete()

pop()


6. Which PHP function is used to get the current timestamp?

time()

current_time()

timestamp()

now()


7. Which PHP function is used to get the length of an array?

count()

length()

size()

array_length()


8. Which PHP function is used to get the MIME type of a file?

mime_content_type()

file_mime_type()

get_mime_type()

mime_type()


9. Which PHP function is used to convert a string to uppercase?

strtoupper()

to_uppercase()

upper()

convert_upper()


10. Which PHP function is used to add elements to the end of an array?

array_push()

add()

insert()

push()