Because the string 'x' is converted to an integer.
<?php$x = 'x';$y = (int) $x;var_dump($y);?>
Output:int(0)
More information about formatting options
Because the string 'x' is
Because the string 'x' is converted to an integer.
<?php$x = 'x';
$y = (int) $x;
var_dump($y);
?>
Output:int(0)