Background: Suppose I have the following obviously-incorrect PHP:
try{
$vtest = '';
print(array_pop($vtest));
}catch(Exception $exx){}
For it to work with array_pop, $vtest should obviously be an array, not a string. Nevertheless, when I run this code the Warning is exhibited. I don't want that, I just want the code to fail silently.
Question: Is there something special about PHP try-catch compared to other languages that cause this not to work?
Disclaimer: There is the standard "at-sign" trick in PHP, but I am curious about whether I can use the more language-agnostic try-catch approach as an alternative.
$vtest = '';
print(@array_pop($vtest)); // <-- would like to avoid this