Dangerous Dave
Digital Marketer
I have just started learning PHP . I am new to it. i have read of logical and bitwise negation in the book that i have bought. I am not able to understand it and following php code.
<?php
$num1=25.59;
$num2=30;
$num3=(~$num1)+(!$num2);
echo "The sum of Bitwise number 25.59 and Logical number 30 is".$num3;
?>
The outcome was "The sum of Bitwise number 25.59 and Logical number 30 is-26"
How the sum come out to be -26
Please explain me.
Thanks in advance.
<?php
$num1=25.59;
$num2=30;
$num3=(~$num1)+(!$num2);
echo "The sum of Bitwise number 25.59 and Logical number 30 is".$num3;
?>
The outcome was "The sum of Bitwise number 25.59 and Logical number 30 is-26"
How the sum come out to be -26
Please explain me.
Thanks in advance.