PHP Test 6 Which of these statements is true? There's little code in PHP to help you interface to databases, but there's no reason why you can't write such code if you want to. PHP interfaces to a number of relational databases such as MySQL, Oracle and Sybase. A wrapper layer is provided so that code written for one database can easily be transferred to another if you later switch your database engine. PHP interfaces to a number of relational databases such as MySQL, Oracle and Sybase but the interface differs in each case. PHP interfaces to the MySQL database,and you should transfer any data in Oracle or Sybase to MySQL if you want to use PHP on the data. Is php can support multiple inheritance? YES NO How would you add 1 to the variable $count? incr $count; $count++; $count =+1 incr count; Which of the following is used to check if a function has already been defined? bool f_exists(functionname) bool func_exist(functioname) bool function_exists(functionname) what is the return value of this substr function? $rest = substr("abcdef", -1); $rest = substr("abcdef", 0, -1); a,abcde a,fedcb b,abcdef f,abcde 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 ? phptutor phptutor/index.php index.php /index.php program will call the function display_result() $x="display"; ${$x.'_result'} (); True False Parser Error None of the above All variables in PHP start with which symbol? ! & $ % Father of PHP? James Gosling Rasmus Lerdorf Guido Van Rossum Larry Wall In PHP the error control operator is @ * . & what will be the output of below code ? $str="3dollars"; $a=20; $a+=$str; print($a); 320dollars 23dollars 203dollars 23 what will be the output of below code ? function zz(& $x) { $x=$x+5; } $x=10; zz($x); echo $x; 15 10 5 0 what will be the output of below code ? echo $_SERVER['REMOTE_ADDR']; shows the IP address of the visitor shows the IP address of the local system shows the IP address of the webserver None of the above What will be the output of below code? $x=dir("."); while($y=$x->read()) { echo $y." " } $y->close(); Parse error display all folder names display a folder content display content of the all drives What will be the output of below code? $qpt = 'QualityPointTechnologies'; echo preg_match("/^Quality/", $qpt); Null 0 Quality 1 What will be the output of below code? $test="3.5seconds"; settype($test,"double"); settype($test,"integer"); settype($test,"string"); print($test); 3seconds 3.5seconds 3 3.5 What will be the output of below code? $x=array(2=>"mouse",7=>"keyboard"); $y=array_keys($x); echo $y[1]; mouse keyboard 2 7 What will be the output of below code? $data="98.8degrees"; (double)$data; (int)$data; (string)$string; echo $data; degrees 98.8degrees 98.8 98 What will be the output of below code? $x="101.5degrees"; (double)$x; (int)$x; echo (string)$x; 101.5 degrees 101.5degrees 101 PHP is Partially cross-platform Truly cross-platform None of above Schreibe einen Kommentar Antworten abbrechenDu musst angemeldet sein, um einen Kommentar abzugeben.