All pastes #221622 Raw Edit

Something

public php v1 · immutable
#221622 ·published 2006-10-25 19:53 UTC
rendered paste body
<?php      $msgToMe = false;      foreach(array("++", "+", "oobeb ", "oobeb: ", "oobeb, ") as $prefix) {          if( substr($msg, 0, strlen($prefix)) == $prefix ) {              $msgToMe = true;              $msgwithoutident = substr($msg, strlen($prefix));          }      }   # Instead of      	if (substr($msg, 0, 2) == "++") 	{		$msgToMe = "true";		$msgwithoutident = substr($msg, 2, strlen($msg)-2);	} 	elseif (substr($msg, 0, 1) == "+") 	{		$msgToMe = "true";		$msgwithoutident = substr($msg, 1, strlen($msg)-1);	} 	elseif (substr($msg, 0, 6) == "oobeb ") 	{		$msgToMe = "true";		$msgwithoutident = substr($msg, 6, strlen($msg)-6);	} 	elseif (substr($msg, 0, 7) == "oobeb: ") 	{		$msgToMe = "true";		$msgwithoutident = substr($msg, 7, strlen($msg)-7);	} 	elseif (substr($msg, 0, 7) == "oobeb, ") 	{		$msgToMe = "true";		$msgwithoutident = substr($msg, 7, strlen($msg)-7);	}	else 		{		$msgToMe = "false";	}?>