PHP Quiz
PHP Quiz
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: 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: 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(); ?>
Ans: B
<?php $x=array(4,2,5,1,4,5,3,4); $y=array_count_values($x); echo count($y); ?>
| PHP
A.Hello B. Error C. good bye D. None of the above
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,B,C