Do php if/else statements cause heavy load on the server?
-
Hi. I am very new to PHP coding in general and hope someone can answer this query.
Let’s say I have this if/else statement running on my WordPress theme that displays specific texts when certain conditions are fulfilled:
<?php { if (condition) { echo "sample text"; } else if (second condition) { echo "sample text 2"; } else if (third condition) { echo "sample text 3"; } else { echo "sample text 4"; } } ?>
The conditions are is_page(), is_home(), is_single() etc. Does this cause heavy load on the server? Thanks.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Do php if/else statements cause heavy load on the server?’ is closed to new replies.