Php Objective Questions with Answers for written test exams 2

Question 2
Which data type will the $a variable have at the end of the following script?


$a = “1”;

echo $x;

?>

A. (int) 1

B. (string) “1”

C. (bool) True

D. (float) 1.0

E. (float) 1
Answers 2


Answer B is correct.When a numeric string is assigned to a variable, it remains

a string, and it is not converted until needed because of an operation that

requires so.

  







Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website. If you are using this website then its your own responsibility to understand the content of the website

--------- Tutorials ---