You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
249 B
PHTML
13 lines
249 B
PHTML
5 years ago
|
<?php
|
||
|
$x = 20; // $x is an integer
|
||
|
$str1 = (string)$x; // $str1 is a string now
|
||
|
// Check whether $x and $str1 are equal or not
|
||
|
if ($x === $str1)
|
||
|
{
|
||
|
echo "They are the same"."\n";
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
echo "They are not same"."\n";
|
||
|
}
|
||
|
?>
|