Hailwood Posted July 7, 2010 Share Posted July 7, 2010 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 More sharing options...
trq Posted July 8, 2010 Share Posted July 8, 2010 here is a set of if statements that i am trying to optimize These type of micro optimizations are generally a waste of time. Link to comment https://forums.phpfreaks.com/topic/207083-if-statements-are-these-the-same/#findComment-1082805 Share on other sites More sharing options...
Hailwood Posted July 8, 2010 Author Share Posted July 8, 2010 here is a set of if statements that i am trying to optimize These type of micro optimizations are generally a waste of time. maybe so, but i am doing optimization on the entire code, so i might as well. Link to comment https://forums.phpfreaks.com/topic/207083-if-statements-are-these-the-same/#findComment-1082806 Share on other sites More sharing options...
trq Posted July 8, 2010 Share Posted July 8, 2010 My last comment still stands. its really not worth my time reading or posting in this thread. Link to comment https://forums.phpfreaks.com/topic/207083-if-statements-are-these-the-same/#findComment-1082807 Share on other sites More sharing options...
Hailwood Posted July 8, 2010 Author Share Posted July 8, 2010 My last comment still stands. its really not worth my time reading or posting in this thread. and in a whole is entirely unhelpful :| Link to comment https://forums.phpfreaks.com/topic/207083-if-statements-are-these-the-same/#findComment-1082808 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.