Jump to content

if statements - are these the same


Hailwood

Recommended Posts

so basically here is a set of if statements that i am trying to optimize, can you please tell me if there are any differences in processing between them

 

 

if($id!="0"    && $status!=""           && $msg_body=="")
if($id != 0    && !empty($status)    && empty($msg_body))

 

 

AND

 

 

 

if($message_type == 0    && $msg_link_id != "0"   && $status==""         && $msg_body!="")
if($message_type == 0    && $msg_link_id != 0     && empty($status)    && !empty($msg_body))

 

 

AND

 

 

if($message_type == 0    && $msg_link_id=="0"    && $status==""         && $msg_body!="")
if($message_type == 0    && $msg_link_id == 0    && empty($status)    && !empty($msg_body))

Link to comment
https://forums.phpfreaks.com/topic/207083-if-statements-are-these-the-same/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.