You are on page 1of 7

Full form of PHP.

A. PreHypertextProcessor B. HypertextPreprocessor C. Hypertext Postprocessor D. PostHypertextProcessor

Ans: B PHP is ________.


A. Partially cross-platform B. Truly cross-platform C. None of above

Ans: B

How do you get information from a form that is submitted using the "get" method? | PHP
A.$_GET[]; B.Request.Form; C.Request.Query String; D.$_POST[];

Ans: A What's the best way to copy a file from within a piece of PHP? | PHP
A. Print out a message asking your user to "telnet" in to the server and copy the file for you B. Open the input and output files, and use read() and write() to copy the data block by block until read() returns a zero C. Use the built in copy() function D. Use "exec" to run an operating system command such as cp (Unix, Linux) or copy (Windows)

Ans: B PHP code is embedded directly into XHTML document? | PHP


A. False B. True

Ans: B What is the expansion of LAMP? | PHP


A. Linux And Mysql Php B. Linux Apache Mysql Php

Ans: B In php Which method is used to getting browser properties? | PHP


A. $_SERVER['HTTP_USER_AGENT']; B. $_SERVER['PHP_SELF'] C. $_SERVER['SERVER_NAME'] D. $_SERVER['HTTP_VARIENT']

Ans: A Which of the following function is used to pick one or more random values from PHP Array? | PHP
A. array_rand() B. array_random() C. Random_array() D. Rand_array()

Ans: A What will be the output of below code: <?php $x=array(1,3,2,3,7,8,9,7,3); $y=array_count_values($x); echo $y[8]; ?> | PHP
A. 43 B. 1 C. 8 D. 6

Ans: B Are there regular expressions in PHP? | PHP


A. Yes - regular expressions use Perl-like conventions B. Yes - PHP supports two different types of regular expressions: POSIX-extended and Perl-Compatible Regular Expressions (PCRE). C. Yes - regular expressions use the POSIX standard D. No - PHP uses "glob" style matching only

Ans: B what is the return value of this substr function?


<?php $rest = substr("abcdef", -1); $rest = substr("abcdef", 0, -1); ?>

4 Sep 2012 0 comments A. f,abcde B. a,fedcb C. b,abcdef D. a,abcde

Ans: A Father of PHP?


A. Larry Wall B. Rasmus Lerdorf C. James Gosling D. Guido Van Rossum

Ans: B In PHP the error control operator is _______ . | PHP


A. . B. * C. @ D. &

Ans: C Whether One-line comment begin with pound sing(#) in php? | PHP
A. True B. False C. None of above

Ans: A 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. | PHP
A. client side language B. local language C. global language D. loosely typed language

Ans: D
<?php $x=dir("."); while($y=$x->read()) { echo $y." " } $y->close(); ?>

What is the following output? | PHP


A. display all folder names B. display a folder content C. display content of the all drives D. Parse error

Ans: B
<?php $x=array(4,2,5,1,4,5,3,4); $y=array_count_values($x); echo count($y); ?>

Find the Output? | PHP


A. 8 B. 5 C. 7 D. 28

Ans: B Which of following variable assignment is 'by value' assignment in PHP


A. $value1= $value? B. $value1= & $value? C. $value1= & $value? D. None

Ans: A 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"; ?>

| PHP
A.Hello B. Error C. good bye D. None of the above

Ans: C Identify the variable scope that is supported by PHP


A. Local variables B. Function parameters C. Hidden variables D. Global variables

Ans: A,B,D Trace the true statement(s) | PHP


A. Any code found within an included file will inherit the variable scope of the location of its caller B. Because the included code will be embedded in a PHP execution block, the PHP execution block, the PHP escape tags (<?php?> aren't required on the file to be includeD. C. For the inclusion of remote files the allow-url-pope must be enabled ad URL wrapper must be supported D. Including a file produces the same result as copying the data from the file specified into the location in which the statement appears.

Ans: A,C,D PHP is a widely used . scripting language that is especially suited for web development and can be embedded into html. | PHP
A. Open source general purpose B. Proprietary general purpose C. Open source special purpose D. Proprietary special purpose

Ans: A 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. | PHP
A. W B. W+ C. A D. A+

Ans: C To work with remote files in PHP you need to enable | PHP
A. allow_url_fopen B. allow_remote_files C. both of above D. none of above

Ans: A Which of the following is/are session function? | PHP


A. sssion_decode B. session_destroy C. session_id D. session_pw

Ans: A,B,C

You might also like