PHP block visibilty

To set block visibilty with fine details in drupal 7, you need to install php filter which is part of drupal core but not enabled by default. And then off to write some code. First part of code uses node type to show, in this case hide block for particular content type and in the second, we check url argument, so we hide if for particaler views.

<?php
  $return = TRUE;
  if ( (arg(0) == 'node') && is_numeric(arg(1)) )  {
    $nid = arg(1);
    $node = node_load($nid);
    $type = $node->type;
    if($type == "dentist") {
       $return = FALSE;
    }
  } 
 if  (arg(0) == 'dentista_in' || arg(0) == 'comment' || arg(0) == 'impianti-dentali' || arg(0) == 'dentisti-croazia-opinioni'  || arg(0) == 'ricerca_per_citta' || arg(0) == 'dentisti_low_cost' || arg(0) == 'studi_dentistici_in_croazia' || arg(0) == 'cliniche_odontoiatriche_croazia'){
      $return = FALSE; 
  }
  return $return;
?>