Why does the following code output 128?
<?php
print 4 << 5;
?>
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Because it’s a bitwise operator. I think it means 4 multiplied to 2^5 because that operator means
so it’s five steps. It’s 4 * 2 * 2 * 2 * 2 * 2 (But I’m guessing here; everything happens at bit level).