Phpcopy Code: Array Echo Isset
Phpcopy Code: Array Echo Isset
Answer: a) isset()
Answer: a) strlen()
phpCopy code
$fruit = array ( 'a' => 'apple' , 'b' => 'banana' ); echo isset ( $fruit [ 'c' ]);
Answer: b) strtoupper()
It's also mentioned that there were basic formality related questions
like "how you will work." This could refer to situational or behavioral
questions. Examples:
phpCopy code
$x = true && false ; var_dump ( $x );
Answer: a) header()
10. Which superglobal does not get its values from the browser?
a) $_GET b) $_POST c) $_SESSION d) $_COOKIE
Answer: c) $_SESSION
Answer: c) session_start();
Answer: b) ;
Answer: d) time()
Answer: c) var_dump()
Answer: d) =<
Answer: c) ord()
21. What does PDO stand for in PHP? a) PHP Data Output b) PHP
Database Object c) PHP Data Object d) PHP Document Object
Answer: b) extension_loaded()
Answer: b) ltrim()
Answer: d) file_get_contents()
27. Which PHP array function is used to take one or more arrays
and combine them? a) array_merge() b) array_combine() c)
array_concat() d) array_join()
Answer: a) array_merge()
28. How can you retrieve the value of a cookie in PHP? a)
$_COOKIE b) $_SESSION c) get_cookie() d) retrieve_cookie()
Answer: a) $_COOKIE
Answer: b) PHPSESSID
30. What does NaN mean in PHP? a) Not a Name b) Not a Number c)
Not any Null d) No Argument Name
Answer: b) array_change_key_case()
Answer: a) array_push()
Answer: d) rsort()
34. Which function can be used to get the last error message in
PHP? a) error_get_last() b) get_error() c) error_message() d) last_error()
Answer: a) error_get_last()
35. Which of the following is not a magic constant in PHP? a) LINE
b) FILE c) DATE d) DIR
Answer: c) DATE
36. What is the correct way to add a comment in PHP that spans
multiple lines? a) // this is a comment b) <!-- this is a comment --> c)
/* this is a comment */ d) -- this is a comment --
Answer: b) FILE
Answer: a) str_replace()
Answer: a) error_reporting(E_ALL)
41. What does the split() function do in PHP? a) Divides a string
by a regular expression b) Splits an array into chunks c) Splits a string
into a character array d) None of the above
Answer: a) strpos()
43. How can you increase the execution time of a PHP script? a)
set_time_limit() b) max_execution_time() c) increase_time() d)
script_time()
Answer: a) set_time_limit()
Answer: d) rand()
47. How can you retrieve the total number of rows returned by a
MySQL query? a) mysql_count_rows() b) mysql_rows() c)
mysql_num_rows() d) count_rows()
Answer: c) mysql_num_rows()
48. Which function in PHP is used to include content from
another file? a) #include b) require c) fetch d) open
Answer: b) require
Answer: a) array_shift()
Answer: c) break
Answer: b) $_SESSION[‘username’]
Answer: c) FILTER_CLEAN_URL
Answer: a) strlen()
57. How can you destroy a PHP session? a) session_destroy() b)
destroy_session() c) session_end() d) end_session()
Answer: a) session_destroy()
phpCopy code
$a = 10 ; $b = 20 ; echo $a <=> $b ;
Answer: c) -1