In PHP, how do variable scope rules apply to Try/Catch blocks? Do variables declared within the try block go out of scope when the block has finished? Or are they i
try
the main concept for the exception handling is that if anything goes wrong inside the "try" block the code will enter into the "catch" block. so if
$o = new Pronk();
does not raise any error it will be in scope. we don't have to declare it before try/catch block. your code is perfectly valid.