php 考题,帮帮忙在线等...
meisusa
![]()
|
1#
meisusa 发表于2007-06-26
php 考题,帮帮忙在线等...
QCM
QCM de php 5 Question 1 : What are the arguments of mktime () ? c A - mktime (hour, minute, second, year, month, day); B - mktime (second, minute, hour, month, day, year); C - mktime (hour, minute, second, month, day, year); D - mktime (hour, minute, second, day, month, year); Question 2 : Let us consider that we have the following code PHP : $xml=simplexml_load_string($string_xml) ; And that $string_xml contain the following xml : <xml_example> <title>This is an example</title> </xml_example> How you a attribute ‘example’ on value ‘true’ to the element xml would add ? A - $xml-> xml_example->example='true' ; B - $xml->title->setAttribute('example','true'); C - $xml->title['example']='true' ; D - $xml->xml_example->title['example']='true'; Question 3 : In the case of a double imbricated foreach, how would bring out you 2 foreach? A - break 2 ; B - break ; C - break (2) ; D - break; break; Question 4 : To what is of use the function array_unshift? A - To add one or several elements at the beginning of a pile B - To delete one or several elements at the end of a pile C - To delete one or several elements at the beginning of a pile D - To add one or several elements at the end of a pile Question 5 : The code php following is : $var1 = "this is an example"; $var2=&$var1; print("$var2 /"); $var2 = "still an example"; unset($var1); print("$var2"); Choose what is going to be posted : A - "still an example"; B - "this is an example"; C - "this is an example / this is an example"; D - "this is an example / still an example"; Question 6 : The code php following is: class Car{ static $color="red"; static function Color(){ return $this->$color; } static function SetColor($new_color){ $this->$color=$new_color; } } echo Car::Color(); Car::SetColor("blue") echo Car::Color(); That goes t-il display in the screen? A - "red" / "red" B - "red" / "blue" C - "" / "blue" D - "red" / "" Question 7 : The code php following is: class Car{ static $color; final static function Color(){ return self::$color; } } To what is of use the final keyword? A - It limits the use of the function(office) to color has only once B - It forbids the classes who inherits from the class because to redefine the function to Color C – It limits the classes who inherits from the class to the use of in the function to Color D - It returns the function Color no used since the outside of the class Question 8 : What happens during the appeal of the function”set_error_handler” A - The user can specify his own codes of error B - The function dismissal the codes of error in a file C - The user fear to specify the levels of error that he wishes to see displaying D - Most of the types excepted usual are not any more managed Question 9 : What a function to use to get back a variable stored in the mask via apc? A - apc_get B - apc_load C - apc_fetch D - apc_return Question 10 : Since when the function Json is natives to Php? A - Php 4.0.5 B - Php 4.2 C - Php 5 D - Php 5.2 Question 11 : What are the parameters to be crossed in the function ftp_login? A - string host, string username, string password B - resource ftp_stream, string username, string password C - string username, string password D - string host, resource ftp_stream Question 12 : In what touch () is of use to the function? A - To verify the existence of a file B - To verify the date of the last modification of a file C - To modify the date of the last modification of a file D - To make the difference between a file and a symbolic link Question 13 : In the following statement of the following function, indicate or is the problem: A - NodeLevel is not of type int B - The parameter NodeLevel does not exist C - The parameter ' parent_node ' is missing. D - D - This function takes no parameter Question 14 : How do a request under sqllite?? A - sqlite_query($db,$query); B - sqlite_query($query); C - sqlite->query($db,$query); D - sqlite::query($db,$query); Question 15 : What whole function after a buffer allows to open purge and to close to have sent back it? A - ob_begin, ob_flush, ob_end B - ob_start, ob_clean, ob_end C - ob_begin, ob_clean, ob_end_flush D - ob_start, ob_clean, ob_end_flush Question 16 : What returns the function socket_write in case of correct writing to a socket? A - The name of the socket B - TRUE C - The number of bytes written in the socket D - The time put to write in the socket Question 17 : The function imagecopyresampled ask like arguments : A - resource dst_image, resource src_image, int dst_x, int dst_y, int src_x, int src_y, int dst_w, int dst_h, int src_w, int src_h B - resource dst_image, resource src_image, int dst_x, int dst_y, int dst_w, int dst_h C - resource dst_image, resource src_image, int src_x, int src_y, int dst_x, int dst_y, int dst_w, int dst_h D - resource dst_image, resource src_image, int dst_x, int dst_y, int src_x, int src_y, int dst_w, int dst_h Question 18 : The PHP code following is : $Array1=array('apple'=>'green','banana'=>'yellow','strawberry'=>'red'); $Array2=array('green'=>'grass','yellow'=>'sun'); print_r(array_intersect_key(array_flip($Array1),$Array2)); Que va afficher ce script? A - Array ( 'apple', 'banana' ) B - Array ( [green] => apple [yellow] => banana ) C - Array ( [apple] => green [banana] => yellow ) D - Rien Question 19 : Which FLAG is authorized for the function Glob (function which lists the elements of a file)? A - GLOB_ONLYDIR B - GLOB_NOSORT C - GLOB_ONLYFILE D - GLOB_BRACE Question 20 : The code following is: $Array1=array(10,2,3,4,1); $Array2=array(5,7,9,3); $Array3=array_splice($Array1,1,4); $Array4=array_splice($Array2,3,2); print_r(array_diff($Array3,$Array4)); What will it show ? A - Array () B - Arary ( [0] => 1 [1] => 2 [3] => 3 ) C - Array ( [0] => 2 [2] => 4 [3] => 1 ) D - Array ( [0] => 2 [1] => 3 [2] => 4 ) |