What is the result of following code?

<?php
if (-1) print "True";
else print "False";
?>
Explanation
-1 is considered TRUE, like any other non-zero (whether negative or positive) number!

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Keep exploring
PHP quizzes
Cosmo
Sign Up Now
or Subscribe for future quizzes