functions

3 views
Skip to first unread message

Mohammed Jebrini

unread,
Sep 27, 2010, 2:52:32 PM9/27/10
to <?PHPalClub
<?php


function testFunction($param,$param2 = null,$param3 = -1)
{

try{
if(!is_int($param))
throw new Exception(" param should be integer ");

if(!is_string($param2))
throw new Exception(" param should be string value ");

if ($param === 10 )
return 10 ;
else
return null ;
}
catch (Exception $e)
{

}

}
Reply all
Reply to author
Forward
0 new messages