original_string: public static function rangeFromBoundaries($from, $to)
      {
          $result = null;
          $invalid = false;
          foreach (array('from', 'to') as $param) {
              if (!($$param instanceof AddressInterface)) {
                  $$param = (string) $$param;
                  if ($$param === '') {
                      $$param = null;
                  } else {
                      $$param = static::addressFromString($$param);
                      if ($$param === null) {
                          $invalid = true;
                      }
                  }
              }
          }
          if ($invalid === false) {
              $result = static::rangeFromBoundaryAddresses($from, $to);
          }
  
          return $result;
      }
code: public static function rangeFromBoundaries($from, $to)
      {
          $result = null;
          $invalid = false;
          foreach (array('from', 'to') as $param) {
              if (!($$param instanceof AddressInterface)) {
                  $$param = (string) $$param;
                  if ($$param === '') {
                      $$param = null;
                  } else {
                      $$param = static::addressFromString($$param);
                      if ($$param === null) {
                          $invalid = true;
                      }
                  }
              }
          }
          if ($invalid === false) {
              $result = static::rangeFromBoundaryAddresses($from, $to);
          }
  
          return $result;
      }
code_tokens: public static function rangeFromBoundaries ( $ from , $ to ) { $ result = null ; $ invalid = false ; foreach ( array ( 'from' , 'to' ) as $ param ) { if ( ! ( $ $ param instanceof AddressInterface ) ) { $ $ param = ( string ) $ $ param ; if ( $ $ param === '' ) { $ $ param = null ; } else { $ $ param = static :: addressFromString ( $ $ param ) ; if ( $ $ param === null ) { $ invalid = true ; } } } } if ( $ invalid === false ) { $ result = static :: rangeFromBoundaryAddresses ( $ from , $ to ) ; } return $ result ; }
docstring: Create a Range instance starting from its boundaries.
  
  @param string|\IPLib\Address\AddressInterface $from
  @param string|\IPLib\Address\AddressInterface $to
  
  @return \IPLib\Range\RangeInterface|null
docstring_tokens: Create a Range instance starting from its boundaries .