R4RIN
Articles
Java 8
MCQS
PHP MCQ Quiz Hub
Current affairs mcq php set 3
Choose a topic to test your knowledge and improve your PHP skills
1. As people gets older, the ability of applying or maintain attention
increases
decreases
stays constant
remains unaffected
2. The brain ____ as people gets older.
shrinks
expands
stays constant
remains unaffected
3. There is __________ in working memory as people gets older.
upgradation
degradation
no change
a slight change
4. _______ is the sort directly applied on an axis using the sort dialog button.
Automatic Sorting
Normal Sorting
Manual Sorting
Computed Sorting
5. Which of the following is not a feature of Tableau?
Speed of Analysis
None of the options
Visual Discovery
Data Recovery
6. How many basic steps involved in creating any Tableau data analysis report?
2
4
3
1
7. Which of the following is not a type of calculation in Tableau?
Date Calculation
Number Calculations
String Calculation
Text Calculation
8. _______ is used to extend the normal data views with some additional features.
Drill down view
Custom data view
Swapping dimensions
9. PHP stands for_________
htpertext processor
pretext hyper processor
preprocessor home page
none of above
10. What is the syntax of PHP code ?
<PHP>
<?PHP?>
<?PHP??
//PHP//
11. What is the concatenation operator in PHP?
=
+
,
.
12. vWhat is the correct way of declaring PHP variables?
$name
$7hello
$this
name
13. PHP is the correct way of declaring PHP variables?
1
-1
0
+1
14. PHP is __________ scripting language.
client side
server side
browser side
none of these
15. Which function is used to sort array in ascending order?
sort()
rsort()
dsort()
none of above
16. There are three different kind of arrays:
Numeric array, String Array, Multidimensional array
Numeric array, Associative array, Dimensional array
Numeric array, associative array, Multidimensional array
Const array, Associative array, Multidimensional array
17. Assume you would like to sort an array in ascending order by value while preserving key associations. Which of the following PHP sorting functions would you use?
Ksort()
assort()
krsort()
sort()
18. Two main structures of branching are____________
if and switch
if and do while
if and for
none of the above
19. Which of the conditional statements is/are supported by PHP?
if statements
if-else statements
All of the above
switch statements
20. do-while loop is called as________
Entry controlled loop
exit controlled loop
entry exit controlled loop
None of the above
21. In a switch-case statement, default can be written__________
any where
should be the last statement
First statement
None of the above
22. Basic syntax for calling a function is
function_name(expression1,expersion2)
(expression 1: Function_name, expersion 2 : Function_name)
(expression 1, expersion 2)
None of them
23. Which function will return true if a variable is an array or false otherwise?
this_array()
is_array()
unset()
in_array()
24. Which of the following PHP function is used to build a function that accepts any number of arguments?
func_get_argv()
func_get_args()
get_argv()
get_argc()
25. Which build-in function will add a value to the end of the array
array_shift()
array_unshift()
array_push()
into_array()
26. which notation is used to access variables of an object?
::
=
->
.
27. Which notation should be used to refer to a method in the context of a class rather than an object you use?
->
_
$
::
28. Which method is invoked just before an object is garbage collected?
_collect()
_garbage()
_destruct()
_destructor()
29. which one of the following property scopes is not supported by PHP?
friendly()
final
public
static
30. which function is used to check if class is exists or not?
exist()
exist_class()
class_exist()
_exits()
31. Which keyword is used to refer to properties or methods within the class itself?
private
public
protected
$this
32. When you use the $_GET variable to collect data, the data is visible to ___________
none
only you
everyone
selected few
33. When you use the $_POST variable to collect data, the data is visible to ____________
none
only you
everyone
selected few
34. Which one of the following should not be used while sending passwords or other sensitive information?
GET
POST
REQUEST
NEXT
35. Which method has larger limit on the amount of data that can be passed to web server?
GET
POST
PUT
SET
36. If we use_______ as value for target attribute in form tag, then the response will display in current page only.
_self
_blank
_post
None
37. Which one of following should not be used while sending sensitive information?
GET
POST
REQUEST
NEXT
38. To validate email address, which flag is passes to filter_val() function?
FILTER_VALIDATE_EMAIL
FILET_VALIDATE_EMAIL
VALIDATE_EMAIL
VALIDATE_EMAIL
39. How many function PHP offers for searching and modifying string using PCRE?
7
8
9
10
40. which of the following is correct about preg_match() function?
The preg_match() function is used to search specified string by string, returns true if the pattern found otherwise false.
The preg_match() function searches throughout string specified by pattern for a string specified by string. The search is not case sensitive.
The preg_match() function searches sting for pattern, returning true if pattern exist otherwise false.
None of above
41. PHP sessions are created using the _______ function.
session_starts()
sessions_start()
session_start()
none of above
42. When you want to store user data in a session use the ________array.
$_SESSION
$YS_SESSION
$SESSION
$_SESSIONS
43. Session allow you to
store persistent user preference on a site
save user authentication information from page to page
create multipage forms
all of above
44. In PHP cookies are set by using
setcookie() function
set() function
COOKIE_SET() function
None of Above
45. The attack which involves the insertion of malicious code into a page frequented byy other users is knows as.
basic SQL injection
Advanced SQL Injection
Cross-site Scripting
Scripting
46. To remove all global session variables, use
session_unset()
Unset()
Unsetsession
$unset()
47. To destroy the session, we use
$destroy()
session_destroy()
destroy_session
session_destroy()
48. Which of the following database is supported by php from beginning
SQL
ORACLE
PostgreSQL
MySQL
49. Which of the following statement is used to create a table.
create table table_name(columnname columntype);
create table_name(column_name column_type);
create table_name(column_name, column_type);
create table table_name(column_type, column_name);
50. which of the following statement initialized mysqli class?
$mysqli=new mysqli();
$mysqli->new.mysqli();
mysqli->new.mysqli();
None of Above
Submit