I am trying an easy multiple conditional statement that ought to work fine with PHP but WordPress states no. What shall we be held missing?

<?php if (is_page('sample1') || is_page('sample2') || is_page('sample3') ||     is_page('sample4')) { ?>
include this
<?php } else { ?>
include this instead
<?php } ?>

Undefined function?

How's it going calling footer.php out of your theme?

It's nothing related to the code you published. It's everything related to the road to the footer or where you stand attempting to load it inside the page lifecycle. Also see if the road is appropriate.