original_string: protected function copyParam($from, $target, $param, $default)
      {
          // param has been changed
          if (strpos($from, sprintf($param, $default)) === false) {
              list($left, $right) = explode('%s', $param);
              $start = strpos($from, $left) + strlen($left);
              $end = strpos($from, $right, $start);
              $value = substr($from, $start, $end - $start);
              $target = str_replace(sprintf($param, $default), sprintf($param, $value), $target);
          }
  
          return $target;
      }
code: protected function copyParam($from, $target, $param, $default)
      {
          // param has been changed
          if (strpos($from, sprintf($param, $default)) === false) {
              list($left, $right) = explode('%s', $param);
              $start = strpos($from, $left) + strlen($left);
              $end = strpos($from, $right, $start);
              $value = substr($from, $start, $end - $start);
              $target = str_replace(sprintf($param, $default), sprintf($param, $value), $target);
          }
  
          return $target;
      }
code_tokens: protected function copyParam ( $ from , $ target , $ param , $ default ) { // param has been changed if ( strpos ( $ from , sprintf ( $ param , $ default ) ) === false ) { list ( $ left , $ right ) = explode ( '%s' , $ param ) ; $ start = strpos ( $ from , $ left ) + strlen ( $ left ) ; $ end = strpos ( $ from , $ right , $ start ) ; $ value = substr ( $ from , $ start , $ end - $ start ) ; $ target = str_replace ( sprintf ( $ param , $ default ) , sprintf ( $ param , $ value ) , $ target ) ; } return $ target ; }
docstring: Copy param value if need.
  
  @param string $from
  @param string $target
  @param string $param
  @param string $default
  
  @return string
docstring_tokens: Copy param value if need .