Page 1 :
PHP, , , Introduction to PHP, , Q1. Fill in the Blanks & Multiple Choice one answer, 1., 2., 3., 4., 5., 6., , PHP stands for --------------- [ Hypertext preprocessor], ------- widely used to general purpose open source server script programming language [PHP], Extension of PHP files is ------------- [.php], PHP is ------- language i.e. there is no need for compilation [ interpreted ], PHP is --------- side scripting language [ server ], ------ is computer system that serves as central repository if data and programs [ server ], , Q2. Multiple Choice three answers, 1, 2, , , , which of the following are features of PHP, Simple, Complex, Interpreted, open source, ambiguous, difficult, which of the following are features of PHP, Faster, time consuming, Error Reporting, Tightly typed loosely typed high level, , PHP Case Sensitivity, , Q1. True or False, 1 Variable in PHP is case sensitive [True], 2 Keywords, function, classes, user defined function are not case sensitive [True], 3. PHP is case sensitive only at time of variable declaration [True], , , Variable and its Scopes, , Q1. Fill in the blanks & multiple choice one answer, 1., 2., 3., 4., 5., , ------- is name or symbol that stands for value in program [ variable ], In PHP , Variable name start with ---- sign followed by variable name [ $ ], In PHP , global variable can be accessed within function using ------- keyword before variable [ Global], Variable declare inside function has ------ -scope and only accessed within that function [ Local ], In PHP , variables scopes are global , static and -------------- [ Local ], , Q2. Multiple Choices two answer & three answers, 1. Which of the following are variable in PHP, Internal, local, external, global, , inline, , static, , PHP Data types & var_dump() method, Q1. Fill in the Blanks, 1. ------- is sequence of characters [ String ], 2. ------- data type is used to store non-decimal number in variable [ Integer ], 3. ------ data type is used to store floating point numbers in variable [ Float ], 4. In PHP, ----- data types represent two possible values True & False. [ Boolean ], 5. ----- is special data type which can only have one value i.e. NULL [ Null ], 6. ----- method in PHP , returns data types of variable [ var_dump() ], Data types in PHP - : Integer, Float, Boolean, Null, Array [Asked in MCQ Question]
Page 2 :
, , Loops in PHP, , Q1. Fill in the Blanks, 1. ----- Loop is used to when you know in advanced how many times code should run. [ for ], 2. ---- loop works only on array used to loop through each value in an array [ foreach], , , PHP String Functions, 1., 2., 3., 4., 5., 6., 7., 8., 9., , ----- string function returns length of string ie number of characters in string [ strlen() ], ------ string function counts number of words in string [ str_word_count() ], ----- string function reverse the string [ strrev() ], ----- string function search for specific text within string and return position [ strops() ], ----- string function convert string to lowercase [ strtolower() ], ----- string function convert string to uppercase [strtoupper() ], --------- string function count number of times substring occurs in string [ substr_count() ], --------- string function converts first character of each word in uppercase [ ucwords() ], -------- string function replace some characters with other characters in string [ str_replace() ], [All above inbuilt functions also asked in MCQ1ANS, MCQ2ANS, and MCQ3ANS], , , , Comments in PHP & echo command, 1. // and ----- are used to add single line comment in PHP [ # ], 2. In PHP , multiline comment start with /* and end with ----- [ */ ], 3. ------ command is used to display text or output on webpage in PHP [ echo ], , , , Match the Pair, , 1., 2., 3., 4., , Group A, Echo command, Add Single line comment, Strrev(), Var_dump(), , 1., 2., 3., 4., , Group A, Str_word_count(), Str_pos(), Strtoupper(), Strlen(), , Group B, a. reverse the string, b. print text or output, c. returns data type, d. // and #, , Group B, a. convert string to uppercase, b. returns length of string, c. count number of words, d. replace text with other text, , ANS : 1b2d3a4c, , ANS : 1c2d3a4b