I have created my first try/catch block like the following.
Code: Select all
function test(){
try{
$value = $r ; // The variable $r do not exist.
}catch( Exception $error ){
echo "Catch block" ;
}
}Is this suppose to work like this or am i doing something wrong.
I am currently testing on Wamp, with Php 5.3.0
If someone have clue, please share.
Thank you.