I've seen function calls preceded with an at symbol to switch off warnings. Today I was skimming some code and found this:
$hn = @$_POST['hn'];
What good will it do here?
Edit: corrected my mistake in naming the symbol. Thanks for pointing it.
I've seen function calls preceded with an at symbol to switch off warnings. Today I was skimming some code and found this:
$hn = @$_POST['hn'];
What good will it do here?
Edit: corrected my mistake in naming the symbol. Thanks for pointing it.
It won't throw a warning if $_POST['hn'] is not set.
All that means is that, if $_POST['hn'] is not defined, then instead of throwing an error or warning, PHP will just assign NULL to $hn.
It suppress warning if $_POST['something'] is not defined.