Maybe my question is not important, but it appears in my head when I work on my project. So I want to know which one is better suited in terms of performance, and I also want to know if there are any other side effects.
Code 1:
if ($result === TRUE){
return TRUE;
}else{
return FALSE;
}
Code 2:
if ($result === FALSE){
return FALSE;
}
return TRUE;
Note that I need to process some code when the condition is true or false, so I posted a comment stating that "// some statements
source
share