You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This, too, is not an actual bug, but rather a suggestion:
This may be because of me migrated from C/C++ to PHP but, it is good practice that instead of returning false or true, returning an integer (mostly defined as a constant) as the result of a function, mostly 0 for success and not zero as the error code. Then, checking the function is simply
if ($err = myfunc())
{
switch($err)
{
caseERR_CASE_ONE:
{
// approperiate action for case onebreak;
}
...default:
{
// approperiate action for unknown errorbreak;
}
}
}
And mostly these errors can be masked. For instance you can mask them with PHP's default error level masks like E_ALL and E_WARNING etc. to form a robust error reporting.
The text was updated successfully, but these errors were encountered:
Hi! Sorry to bother you again.
This, too, is not an actual bug, but rather a suggestion:
This may be because of me migrated from C/C++ to PHP but, it is good practice that instead of returning false or true, returning an integer (mostly defined as a constant) as the result of a function, mostly 0 for success and not zero as the error code. Then, checking the function is simply
And mostly these errors can be masked. For instance you can mask them with PHP's default error level masks like
E_ALL
andE_WARNING
etc. to form a robust error reporting.The text was updated successfully, but these errors were encountered: