Am I write assuming you want something like this:
PHP Code:
<?php
  abc1
(false);
  echo 
"HELLO";
  
abc1(true);
  echo 
"WORLD";

function 
abc1($doIt)
{
  if(
$doIt) {
    return;
  }
  echo 
"&"// This doesn't get run if $doIt == true but the script continues
}
?>
OUTPUT:
&HELLOWORLD
Or:
PHP Code:
<?php
  abc2
(false);
  echo 
"HELLO";
  
abc2(true);
  echo 
"WORLD";

function 
abc2($doIt)
{
  if(
$doIt) {
    exit(
0);
  }
  echo 
"&"// This doesn't get run if $doIt == true but also the whole script stops.
}
?>
OUTPUT:
&HELLO