The setrawcookie() method of setting cookies is different from PHP standard method of cookie setting as:
a. It does not allow expiry time to be set
b. It can be used only once
c. It does not URL-ENCODE the value on its own
d.It does not allow domain setting
Solution:
C
Question.2.
You need to keep an eye on the existing number of objects of a given class without introducing a non-class varibale. which of the following makes this happen?
a. Add a member varibale that gets incremented in the default constructer and decremented the destructer.
b. Add a local variable that gets incremented in each constructer and decremented in the desructer
c. Add a static member variable that gets incremented in each constructer and decreented in the destructor
d. This cannot be accomplished since the creation of objects is being done dynamically via "new"
Question.3.
which of the following variable declaration within a class is invalid in PHP5?
a. private $type = "moderate";
b. var $term = 3;
c. public $amn = "500";
d. protected $name = 'Quantes Private Limited';
Solution:
Question.4.
which of the following is not valid PHP parser tag?
a. script
b. ?p
c. %
d. ?php;
Solution:
Question.5.
How can you hide the fact that web pages are written in PHP?
a. By using AddType application/X-httpd-php asp
b. Specify all file names without any dot and extension
c. By using .htaccess diretive in Apeche
d. All of the above
Solution:
C
Question.6.
What is the output of the following code?
$a = 3;
$b = 2;
echo (int)$a/(int)$b
?>
a. 1
b. 1.5
c. 2
d. 3
e. Eroor
Solution:
b
Question.7.
Which one is correct?
a. $s = fwrite ("a string here");
b. $s = fwrite ($fp,"a string here");
c. $s = fwrite ("a string here",$fp);
d. non of the above
Solution:
b
Question.8.