<?php
$a = “1”;
echo $a;
?>
A. (int) 1
B. (string) “1”
C. (bool) True
D. (float) 1.0
E. (float) 1
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.
Post new comment