menu

Web Development With PHP


1. Which PHP function is used to output text to the web page?

echo

print

printf

write


2. Which PHP function is used to redirect the user to another web page?

header()

location()

redirect()

navigate()


3. Which PHP function is used to get the current date and time?

time()

date()

datetime()

now()


4. Which PHP function is used to convert a string to all uppercase letters?

to_uppercase()

strtoupper()

upper()

case_upper()


5. Which PHP function is used to retrieve the length of a string?

length()

size()

strlen()

count()


6. Which of the following is NOT a web development language?

PHP

HTML

CSS

Java


7. Which of the following is NOT a valid comparison operator in PHP?

==

!=

<=>

><


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

file_exists()

check_file()

exists_file()

file_check()


9. Which of the following is NOT a valid loop in PHP?

for

while

do-while

repeat-until


10. Which of the following is NOT a valid data type in PHP?

boolean

integer

float

char