Cleaner way to define multiple variables for is_page_template()

Check out this Alternative

<?php 
  // in the loop:
  $template = get_page_template_slug( get_the_ID() );
  if (in_array($template,array('home1','home2')) ) ){
     // Yep, Do your stuff
  }

  // anywhere:
  $template = get_page_template_slug( $some_post_ID );
  if (in_array($template,array('home1','home2')) ) ){
     // Yep, Do your stuff
  }
?>

error code: 523