

MCQOPTIONS
Saved Bookmarks
This section includes 69 Mcqs, each offering curated multiple-choice questions to sharpen your Php knowledge and support exam preparation. Choose a topic below to get started.
1. |
Same name with different capitalization in PHP variables results the |
A. | Same output |
B. | Different output |
C. | Error |
D. | None of them |
Answer» C. Error | |
2. |
A mathematical error NAN stands for |
A. | Number and Number |
B. | Not a Number |
C. | Non Number |
D. | None of them |
Answer» C. Non Number | |
3. |
PHP uses arrays while Perl works on |
A. | Trees |
B. | Hashes |
C. | Linked lists |
D. | None of them |
Answer» C. Linked lists | |
4. |
Failing to close off a quoted string can cause |
A. | Parsing error |
B. | Rendering error |
C. | Functions error |
D. | None of them |
Answer» B. Rendering error | |
5. |
Chr ( ) function changes a string into a/an |
A. | Integer type |
B. | String type |
C. | Array type |
D. | None of them |
Answer» B. String type | |
6. |
Which are problems that is not reported as an error on page by PHP? |
A. | Rendering problem |
B. | Installation related problem |
C. | Parsing errors |
D. | Failure of loading errors |
Answer» B. Installation related problem | |
7. |
When integer value overflows, they become |
A. | Boolean |
B. | Floats |
C. | Integers |
D. | Strings |
Answer» C. Integers | |
8. |
Get method assigns its data to web server that's why |
A. | It has limited length |
B. | It has greater capacity |
C. | It may encounter some errors |
D. | None |
Answer» B. It has greater capacity | |
9. |
Which method is more secure than other? |
A. | Get method |
B. | Post method |
C. | No one offers more security than other |
D. | Put method |
Answer» D. Put method | |
10. |
For adding no idempotent information into a database which method is more preferable? |
A. | Get method |
B. | Post method |
C. | Put method |
D. | Set method |
Answer» C. Put method | |
11. |
Performing automatic type variable conversion is an example of |
A. | SQL |
B. | Vb .net |
C. | PHP |
D. | None of them |
Answer» D. None of them | |
12. |
Which of the following can you place inside a namespace?i) classesii) functionsiii) variables |
A. | i) |
B. | ii) |
C. | iii) |
D. | All of the mentioned |
Answer» E. | |
13. |
Which function is used for determining location of syntax error? |
A. | error ( ) |
B. | syn_error ( ) |
C. | die ( ) |
D. | find ( ) |
Answer» D. find ( ) | |
14. |
PHP stores all global variables in an array called |
A. | $GLOBAL_ARRAY [ ] |
B. | $G_ARRAY [ ] |
C. | $GLOBALS [ ] |
D. | $GLOB_ARRAY [ ] |
Answer» D. $GLOB_ARRAY [ ] | |
15. |
In HTML forms if you want to display it with prefilled inputs than use |
A. | Value attribute |
B. | Get method |
C. | Post method |
D. | None of them |
Answer» B. Get method | |
16. |
For accessing global variables anywhere from script, PHP uses |
A. | Get and Post Methods |
B. | Functions |
C. | Superglobal Arrays |
D. | None of them |
Answer» D. None of them | |
17. |
Which method passes arguments from one page to next as a part of uniform resource indicator? |
A. | Post method |
B. | Get method |
C. | Parsing method |
D. | None of them |
Answer» C. Parsing method | |
18. |
Which method has much larger limit on amount of data that can be passed to web server? |
A. | Get method |
B. | Post method |
C. | Put method |
D. | Set method |
Answer» C. Put method | |
19. |
Which method is not suitable for logins because it stores data in client browsers memory? |
A. | Post method |
B. | Put method |
C. | Get method |
D. | Set method |
Answer» D. Set method | |
20. |
In Post method results at a given moment cannot be |
A. | Saved |
B. | Move |
C. | Bookmarked |
D. | Deleted |
Answer» D. Deleted | |
21. |
Although PHP is embedded with HTML but PHP syntax only applies in |
A. | HTML tags |
B. | PHP tag |
C. | CSS tag |
D. | None of them |
Answer» C. CSS tag | |
22. |
Constants in PHP are not denoted by $ sign but they are differentiated by |
A. | Lowercase letters |
B. | Uppercase letters |
C. | Asterisk sign * |
D. | Hash sign # |
Answer» C. Asterisk sign * | |
23. |
Every statement and expression in PHP is terminated by |
A. | Semicolon ; |
B. | Slash / |
C. | Asterisk * |
D. | None of them |
Answer» B. Slash / | |
24. |
Which statement is correct for using Get method? |
A. | <form ACTION="Myfile.php" method="GET"> |
B. | <form ACTION="Get" method="Myfile.php"> |
C. | <form="" method="GET"> |
D. | All are Correct |
Answer» B. <form ACTION="Get" method="Myfile.php"> | |
25. |
All variables in PHP are denoted by |
A. | Dollar sign $ |
B. | Hash sign # |
C. | Asterisk sign * |
D. | Percent sign % |
Answer» B. Hash sign # | |
26. |
PHP is sometimes |
A. | Case sensitive |
B. | Used as programming language |
C. | Used for front end designing |
D. | All of them |
Answer» B. Used as programming language | |
27. |
Superglobal array was introduced in |
A. | PHP3 |
B. | PHP4 |
C. | PHP5 |
D. | PHP6 |
Answer» C. PHP5 | |
28. |
Missing of semicolon, No dollar signs are example of |
A. | Rendering problem |
B. | Installation related problem |
C. | Parsing errors |
D. | None of them |
Answer» D. None of them | |
29. |
Variables in PHP are |
A. | Bounded |
B. | Case-insensitive |
C. | Case-sensitive |
D. | None of them |
Answer» D. None of them | |
30. |
In PHP6 Register_ globals are |
A. | Improved |
B. | Updated |
C. | Changed |
D. | Officially gone |
Answer» E. | |
31. |
Which method is used for generating complex URL strings for dynamic web pages? |
A. | Post method |
B. | Get method |
C. | Session method |
D. | Cookies method |
Answer» C. Session method | |
32. |
Which function is used to convert a float type into integers? |
A. | ceil ( ) |
B. | floor ( ) |
C. | round ( ) |
D. | All of them |
Answer» E. | |
33. |
Is_unicode (arg) function returns true when |
A. | Argument is unicode converted |
B. | Argument is numeric type |
C. | Argument is unicode string |
D. | None of them |
Answer» D. None of them | |
34. |
Browsers exhibit different behaviors when user navigates their back and forward buttons, it's a disadvantage of? |
A. | Post method |
B. | Get method |
C. | Put method |
D. | None of them |
Answer» B. Get method | |
35. |
Every Get method submission is recorded in the |
A. | Script |
B. | Web server |
C. | History |
D. | All of them |
Answer» C. History | |
36. |
All variables in PHP are assigned with the |
A. | Hash sign # |
B. | Dollar sign $ |
C. | Assignment sign = |
D. | None of them |
Answer» D. None of them | |
37. |
In Boolean context unbound variable is considered as |
A. | TRUE |
B. | FALSE |
C. | Empty |
D. | None of them |
Answer» C. Empty | |
38. |
Word echo used interchangeably as |
A. | |
B. | Scan |
C. | Constant |
D. | Variable |
Answer» B. Scan | |
39. |
There are how many main methods for passing information between web pages and server |
A. | 2 methods |
B. | 3 methods |
C. | 4 methods |
D. | A lot of methods |
Answer» D. A lot of methods | |
40. |
All installation and rendering problems, failures and errors are called as |
A. | PHP gotchas |
B. | PHP problems |
C. | PHP failures |
D. | None of them |
Answer» B. PHP problems | |
41. |
Conversion functions, Type casts and what is third way to manipulate a data type? |
A. | Calling settype ( ) function |
B. | Calling type ( ) function |
C. | By changing mode |
D. | None of them |
Answer» B. Calling type ( ) function | |
42. |
Server or host not found/ Page cannot be displayed is a |
A. | Rendering problem |
B. | Installation related problem |
C. | Parsing errors |
D. | All of them |
Answer» C. Parsing errors | |
43. |
# is the visibility code for? |
A. | Private |
B. | Friendly |
C. | Protected |
D. | Static |
Answer» D. Static | |
44. |
$GLOBALS, $_SERVER, $_REQUEST, $_POST, $_GET, $_FILES, $_COOKIE, $_SESSION all are example of |
A. | Super array |
B. | Global variables |
C. | Local variables |
D. | None of them |
Answer» C. Local variables | |
45. |
These # MY PHP File? and // My PHP File? statements are example of |
A. | Single line comment |
B. | Multiline comments |
C. | Variable declaration |
D. | None of them |
Answer» B. Multiline comments | |
46. |
An unbound variable are interpreted as 0 in a |
A. | Numerical context |
B. | String context |
C. | Boolean context |
D. | Array context |
Answer» B. String context | |
47. |
PHP is different from other languages because variables do not have to be |
A. | Bounded |
B. | Declared before being assigned |
C. | Character type |
D. | Integer type |
Answer» C. Character type | |
48. |
Perl is a |
A. | Scripting language |
B. | Markup language |
C. | Compiled run time Language |
D. | None of them |
Answer» B. Markup language | |
49. |
By default all GET, Post, Cookie, Environment, and Server variables are directly accessible in PHP because it is defined in |
A. | Web server |
B. | php.ini |
C. | Register globals directive |
D. | Both b and c |
Answer» E. | |
50. |
Which path is correct for linking a php file to a web server? |
A. | file://home/httpd/html/mysite/mypage.php |
B. | http:// localhost/mysite/mypage.php |
C. | httpd:// myfile.php/home/html |
D. | All of them |
Answer» C. httpd:// myfile.php/home/html | |