PPSC Computer Science Chapter 9 PHP Online Test With Answers

PPSC Computer Science Chapter 9 PHP Online Test

Sr. # Questions Answers Choice
1 Which of the following type specifier is invalid in print f ( ) functions. % a % b % c % d
2 Which of the following statement is more suitable if you want to output a blend of static text and dynamics information stored within one or several variables. Echo() Print () print f() None
3 Which of the following function return 1 when output is successful. echo() Print () Both None
4 Which of following commenting is supported by PHP Single line c++syntax -ii Shell syntax -# Both of above None
5 PHP supports all four different ways of delimiting in this context identify the false statement. You can use any of the delimiting style. You can use different delimiting style in same page You can use any delimiting style but must use a single style consistently for a page. Variables declared in previous blocks are remembered on later blocks tool
6 When uploading a file if the UPLOAD_ERR-OK contains value 0 it means. Upload is not successful error occurred The file uploaded with success Uploaded file size is 0 File upload progress is 0% completed
7 Which of the following is not a session function. Session _decode Session _ destroy Session _id Session _ pw
8 In mail ($param2, $ param 2, $param3, $param 4), the $param 2 contains. The message The recipient The header The subject
9 f open ($file_doc."r+& rduo opens a file for. reading writing both above None
10 To work with remote files in PHP you need to enable. Allow _url _fopen Allow _ remote_files Both of above None
11 The function setcookie () is used to. Enable or disable cookie support Declare cookie variables Store data in cookie variable All of above
12 Which of the following mode of fopen () function opens a file only for writing if a file with that name does not exist, attempts to create a new file, If the file exist , place the file pointer at the end of the file after all other data. W W+ A A+
13 Which of the following method is suitable when you need to send larger form submissions. Get Post Both Get and post None of above
14 Which of the following method sends input to a script via a URL. Get Post Both None
15 The difference between include ( ) and require() Are different how they handle failure Both are same in every aspects Is include () produced a fatal error while require results in a warning. None
16 A variable $word is set to "HELLO WORLD" which of the following script returns in title case. Echo uc words ($word) Echo uc words (strtolower ($word) Echo uc first ($word) None of above
17 When you need to obtain the ASCII value of a character which of the following unction you apply in PHP. chr ( ): ace ( ): ord ( ): Val ( ):
18 Which of the following function returns the number of character in a string variable. Count ($ variable) Len ($variable) Strcount ($variable) Strien ($variable)
19 You can define a constant by using the define () function Once a constant is defined. It can never the changed of underdefined It can never be changed but can be undefined. It can be changed but can not be undefined It can be changed and can be undefined
20 Which of the following variables is not a predefined variable. $get $ask #reuest #post
Download This Set

Is this page helpful?