Most Frequently Asked PHP Multiple Choice Questions and Answers for Freshers and Experienced PDF
1) Full form of PHP
2) How do you get information from a form that is submitted using the "get" method?
3) What's the best way to copy a file from within a piece of PHP?
4) PHP code is embedded directly into XHTML document?
5) Is it possible to submit a form with out a submit button?
6) <?php $x=array("aaa","ttt","www","ttt","yyy","tttt"); $y=array_count_values($x); echo $y[ttt]; ?>
7) What is the expansion of LAMP?
8) In php Which method is used to getting browser properties?
9) Which of the following function is used to pick one or more random values from PHP Array?
10) What will be the below code:
<?php $x=array(1,3,2,3,7,8,9,7,3); $y=array_count_values($x); echo $y[8]; ?>
11) Assume that your php file 'index.php' in location c:/apache/htdocs/phptutor/index.php. If you used $_SERVER['PHP_SELF'] function in your page, then what is the return value of this function ?
12) Which operator is used to concatenate two strings in php?
13) Are there regular expressions in PHP?
14) In PHP, which of the following function is used to insert content of one php file into another php file before server executes it
15) what will be the ouput of below code ? Assume that today is 2009-5-19:2:45:32 pm <?php$today = date("F j, Y, g:i a");?>
16) Which of the following function is used for terminate the script execution in PHP?
17) What function used to print statement in PHP?
18) what will be the output of below code ?
<?php define("x","5"); $x=x+10; echo x; ?>
19) what will be the output of below code ?<?php $arr = array(5 => 1, 12 => 2); $arr[] = 56; $arr["x"] = 42; unset($arr); echo var_dump($arr);?>
20) PHP variables are
21) Which of these statements is true?
22) Is php can support multiple inheritance?
23) How would you add 1 to the variable $count?
24) Which of the following is used to check if a function has already been defined?
25) what is the return value of this substr function?<?php$rest = substr("abcdef", -1);$rest = substr("abcdef", 0, -1);?>
26) Assume that your php file 'index.php' in location c:/apache/htdocs/phptutor/index.php. If you used basename($_SERVER['PHP_SELF']) function in your page, then what is the return value of this function ?
27) <?php$x="display"; ${$x.'_result'} (); ?> Above program will call the function display_result()
28) All variables in PHP start with which symbol?
29) Father of PHP?
30) In PHP the error control operator is _______ .
31) <?php$str="3dollars"; $a=20; $a+=$str; print($A.; ?> Output ?
32) <?php function zz(& $x) { $x=$x+5; } ?> $x=10; zz($x); echo $x;
33) <?php echo $_SERVER['REMOTE_ADDR']; ?> Find the Output?
34) <?php $x=dir("."); while($y=$x->read()) { echo $y."" } $y->close(); ?> What is the following output?
35) <?php $bdn = 'BlosumsDotNet'; echo preg_match("/^Blosums/", $bdn); ?>
36) <?php $test="3.5seconds"; settype($test,"double"); settype($test,"integer"); settype($test,"string"); print($test); ?> What is the following output?
37) <?php $x=array(2=>"mouse",7=>"keyboard"); $y=array_keys($x); echo $y[1]; ?>
38) <?php$data="98.8degrees"; (double)$data; (int)$data; (string)$string; echo $data; ?>
39) PHP is
40) <?php $x="101.5degrees"; (double)$x; (int)$x; echo (string)$x; ?>
41) Whether One-line comment begin with pound sing(#) in php?
42) In PHP, during error handling include() generates......................
43) <?php $qpt = 'Eat to live, but not live to eat'; echo preg_match("/^to/", $qpt); ?>
44) <?php $x=array("aaa","","ccc","ddd",""); $y=array_unique($x); echo count($x) . "," . count($y); ?> Find the Output?
45) PHP is a _____ . It means you do not have to tell PHP which data type the variable is.PHP automatically converts the variable to the correct data type, depending on its value.
46) Which of the following is not a valid variable name?
47) Which of the following function is used to change the root directory in PHP?
48) Which of following function return 1 when output is successful?
49)<?php $father="mother"; $mother="son"; echo $$father; ?> Find the Output?
50) <?php $x=array(4,2,5,1,4,5,3,4); $y=array_count_values($x); echo count($y); ?> Find the Output?
51) The PHP syntax is most similar to:
52) what will be the output of below code ?<?php$arr = array(5 => 1, 12 => 2); $arr[] = 56; $arr["x"] = 42; echo var_dump($arr);?>
53) what will the ouptut of below date() function ?<?php$date="2009-5-19";$time="14:31:38";$datetime=$date.$time;echo date("Y-m-d:H:i:s",strtotime($datetime));?>
54) Find the Output?
<?php $color=array("red","yellow","white"); $x=in_array("black",$color); if($x==0) echo "good bye"; if($x==1) echo "Hello"; ?>
55. Trace the odd data type
56. Which of the following are valid float values?
57. In php string data are
58. Which of the following delimiting method is known as string Interpolation
59. Which datatypes are treaded as arrays
60. Which of following are compound data type?
61. Casting operator introduced in PHP 6 is
62. When defining identifier in PHP you should remember that
63. Identify the invalid identifier
64. Which of following variable assignment is 'by value' assignment in PHP
65. Identify the variable scope that is not supported by PHP
66. The output of following script would be$somerar=15;function ad it () {GLOBAL $somevar;$somerar++ ;echo "somerar is $somerar";}addit ();
67. Variable scope on which a variable does not loose its value when the function exists and use that value if the function is called again is:
68. The left association operator % is used in PHP for
69. The left associative dot operator (.) is used in PHP for
70. Trace the false statement
71. Which of the following functions require the allow-url-fopen must be enabled?
72. Which function includes the specified file even the statement evaluates to false in which block the function is placed.
73. On failure of which statement the script execution stops displaying error/warning message?
74. Trace the function that does continue the script execution even if the file inclusion fails
75. A script is a
76. When compared to the compiled program, scripts run
77. PHP is a widely used ……………. scripting language that is especially suited for web development and can be embedded into html
78. Which of the following is not true?
79. The most portable version of PHP tag that is compatible to embed in XML or XHTML too is:
80. Which of the following variables is not a predefined variable?
81. You can define a constant by using the define() function. Once a constant is defined
82. Which of the following function returns the number of characters in a string variable?
83. When you need to obtain the ASCII value of a character which of the following function you apply in PHP?
84. A variable $word is set to “HELLO WORLD”, which of the following script returns in title case?
85. The difference between include() and require()
86. When a file is included the code it contains, behave for variable scope of the line on which the include occurs
87. Which of the following method sends input to a script via a URL?
88. Which of the following method is suitable when you need to send larger form submissions?
89. 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 anew file. If the file exist, place the file pointer at the end of the file after all other data.
90. The function setcookie( ) is used to
91. To work with remote files in PHP you need to enable
92. In mail($param2, $param2, $param3, $param4), the $param2 contains:
93. mysql_connect( ) does not take following parameter
94. Study following steps and determine the correct order(1) Open a connection to MySql server(2) Execute the SQL query(3) Fetch the data from query(4) Select database(5) Close Connection
95. Which of the following is not a session function?
96. When uploading a file if the UPLOAD_ERR-OK contains value 0 it means
97. Which of the following delimiter syntax is PHP's default delimiter syntax
98. Which of the following statement produce different output
99. Php supports all four different ways of delimiting. In this context identify the false statement
100. Which of following commenting is supported by Php
101. To produce the output6 I love the summer time, Which of the ofllowing statement should be used?
1) Full form of PHP
2) How do you get information from a form that is submitted using the "get" method?
3) What's the best way to copy a file from within a piece of PHP?
4) PHP code is embedded directly into XHTML document?
5) Is it possible to submit a form with out a submit button?
6) <?php $x=array("aaa","ttt","www","ttt","yyy","tttt"); $y=array_count_values($x); echo $y[ttt]; ?>
7) What is the expansion of LAMP?
8) In php Which method is used to getting browser properties?
9) Which of the following function is used to pick one or more random values from PHP Array?
10) What will be the below code:
<?php $x=array(1,3,2,3,7,8,9,7,3); $y=array_count_values($x); echo $y[8]; ?>
11) Assume that your php file 'index.php' in location c:/apache/htdocs/phptutor/index.php. If you used $_SERVER['PHP_SELF'] function in your page, then what is the return value of this function ?
12) Which operator is used to concatenate two strings in php?
13) Are there regular expressions in PHP?
14) In PHP, which of the following function is used to insert content of one php file into another php file before server executes it
15) what will be the ouput of below code ? Assume that today is 2009-5-19:2:45:32 pm <?php$today = date("F j, Y, g:i a");?>
16) Which of the following function is used for terminate the script execution in PHP?
17) What function used to print statement in PHP?
18) what will be the output of below code ?
<?php define("x","5"); $x=x+10; echo x; ?>
19) what will be the output of below code ?<?php $arr = array(5 => 1, 12 => 2); $arr[] = 56; $arr["x"] = 42; unset($arr); echo var_dump($arr);?>
20) PHP variables are
21) Which of these statements is true?
22) Is php can support multiple inheritance?
23) How would you add 1 to the variable $count?
24) Which of the following is used to check if a function has already been defined?
25) what is the return value of this substr function?<?php$rest = substr("abcdef", -1);$rest = substr("abcdef", 0, -1);?>
26) Assume that your php file 'index.php' in location c:/apache/htdocs/phptutor/index.php. If you used basename($_SERVER['PHP_SELF']) function in your page, then what is the return value of this function ?
27) <?php$x="display"; ${$x.'_result'} (); ?> Above program will call the function display_result()
28) All variables in PHP start with which symbol?
29) Father of PHP?
30) In PHP the error control operator is _______ .
31) <?php$str="3dollars"; $a=20; $a+=$str; print($A.; ?> Output ?
32) <?php function zz(& $x) { $x=$x+5; } ?> $x=10; zz($x); echo $x;
33) <?php echo $_SERVER['REMOTE_ADDR']; ?> Find the Output?
34) <?php $x=dir("."); while($y=$x->read()) { echo $y."" } $y->close(); ?> What is the following output?
35) <?php $bdn = 'BlosumsDotNet'; echo preg_match("/^Blosums/", $bdn); ?>
36) <?php $test="3.5seconds"; settype($test,"double"); settype($test,"integer"); settype($test,"string"); print($test); ?> What is the following output?
37) <?php $x=array(2=>"mouse",7=>"keyboard"); $y=array_keys($x); echo $y[1]; ?>
38) <?php$data="98.8degrees"; (double)$data; (int)$data; (string)$string; echo $data; ?>
39) PHP is
40) <?php $x="101.5degrees"; (double)$x; (int)$x; echo (string)$x; ?>
41) Whether One-line comment begin with pound sing(#) in php?
42) In PHP, during error handling include() generates......................
43) <?php $qpt = 'Eat to live, but not live to eat'; echo preg_match("/^to/", $qpt); ?>
44) <?php $x=array("aaa","","ccc","ddd",""); $y=array_unique($x); echo count($x) . "," . count($y); ?> Find the Output?
45) PHP is a _____ . It means you do not have to tell PHP which data type the variable is.PHP automatically converts the variable to the correct data type, depending on its value.
46) Which of the following is not a valid variable name?
47) Which of the following function is used to change the root directory in PHP?
48) Which of following function return 1 when output is successful?
49)<?php $father="mother"; $mother="son"; echo $$father; ?> Find the Output?
50) <?php $x=array(4,2,5,1,4,5,3,4); $y=array_count_values($x); echo count($y); ?> Find the Output?
51) The PHP syntax is most similar to:
52) what will be the output of below code ?<?php$arr = array(5 => 1, 12 => 2); $arr[] = 56; $arr["x"] = 42; echo var_dump($arr);?>
53) what will the ouptut of below date() function ?<?php$date="2009-5-19";$time="14:31:38";$datetime=$date.$time;echo date("Y-m-d:H:i:s",strtotime($datetime));?>
54) Find the Output?
<?php $color=array("red","yellow","white"); $x=in_array("black",$color); if($x==0) echo "good bye"; if($x==1) echo "Hello"; ?>
55. Trace the odd data type
56. Which of the following are valid float values?
57. In php string data are
58. Which of the following delimiting method is known as string Interpolation
59. Which datatypes are treaded as arrays
60. Which of following are compound data type?
61. Casting operator introduced in PHP 6 is
62. When defining identifier in PHP you should remember that
63. Identify the invalid identifier
64. Which of following variable assignment is 'by value' assignment in PHP
65. Identify the variable scope that is not supported by PHP
66. The output of following script would be$somerar=15;function ad it () {GLOBAL $somevar;$somerar++ ;echo "somerar is $somerar";}addit ();
67. Variable scope on which a variable does not loose its value when the function exists and use that value if the function is called again is:
68. The left association operator % is used in PHP for
69. The left associative dot operator (.) is used in PHP for
70. Trace the false statement
71. Which of the following functions require the allow-url-fopen must be enabled?
72. Which function includes the specified file even the statement evaluates to false in which block the function is placed.
73. On failure of which statement the script execution stops displaying error/warning message?
74. Trace the function that does continue the script execution even if the file inclusion fails
75. A script is a
76. When compared to the compiled program, scripts run
77. PHP is a widely used ……………. scripting language that is especially suited for web development and can be embedded into html
78. Which of the following is not true?
79. The most portable version of PHP tag that is compatible to embed in XML or XHTML too is:
80. Which of the following variables is not a predefined variable?
81. You can define a constant by using the define() function. Once a constant is defined
82. Which of the following function returns the number of characters in a string variable?
83. When you need to obtain the ASCII value of a character which of the following function you apply in PHP?
84. A variable $word is set to “HELLO WORLD”, which of the following script returns in title case?
85. The difference between include() and require()
86. When a file is included the code it contains, behave for variable scope of the line on which the include occurs
87. Which of the following method sends input to a script via a URL?
88. Which of the following method is suitable when you need to send larger form submissions?
89. 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 anew file. If the file exist, place the file pointer at the end of the file after all other data.
90. The function setcookie( ) is used to
91. To work with remote files in PHP you need to enable
92. In mail($param2, $param2, $param3, $param4), the $param2 contains:
93. mysql_connect( ) does not take following parameter
94. Study following steps and determine the correct order(1) Open a connection to MySql server(2) Execute the SQL query(3) Fetch the data from query(4) Select database(5) Close Connection
95. Which of the following is not a session function?
96. When uploading a file if the UPLOAD_ERR-OK contains value 0 it means
97. Which of the following delimiter syntax is PHP's default delimiter syntax
98. Which of the following statement produce different output
99. Php supports all four different ways of delimiting. In this context identify the false statement
100. Which of following commenting is supported by Php
101. To produce the output6 I love the summer time, Which of the ofllowing statement should be used?
No comments:
Post a Comment