I have a PHP function which requires 2 arguments . The function calculates the number of days between that given 2 dates(arguments are given in MM/DD/YYYY format) . When I am passing invalid type of arguments PHP throws me an error .
So my question is … Is there a function or something like that which will catch that error (So that already PHP will not throw me an error) so I will be able to use that in my “if()” statments to see weather the function has been successfully executed ?
I have a PHP function which requires 2 arguments . The function calculates the
Share
You should write your code but you can try something like this: