by da_n · 13y ago · 0 comments
// $set $foo to $bar
$foo == $bar;
// print out value of $foo
echo $foo;
// is $bar the same as $foo? if so, return true, otherwise return false
if ( $bar === $foo ) { // check if the same
return true; // great, it's true!
} else { // here we check if it isn't true
return false; // nope, not true, let's return false
}
I have nothing against comments where something needs to be documented, but not everything needs comments as most code is essentially self-documenting.Edited for clarity.