I have a doubt regarding the control structures. Well, I always opened and closed the parentheses, this only once => ()
What happens is that I recently came to realize that some people use two parentheses (())
of opening and closing, but what is the real meaning of that, what is the difference?
What is the difference between the scripts below?
First
<?php
$string = "Hello World!";
if ( $string == "Hello World!" ) {
print(1); //True
} else {
print(0); //False
}
Second
<?php
$string = "Hello World!";
if (( $string == "Hello World!" )) {
print(1); //True
} else {
print(0); //False
}
Aucun commentaire:
Enregistrer un commentaire