original_string: protected static function exceptionOnFalse($resource, callable $closure)
      {
          $result = $closure($resource);
  
          if ($result === false) {
              throw new SocketException($resource);
          }
  
          return $result;
      }
code: protected static function exceptionOnFalse($resource, callable $closure)
      {
          $result = $closure($resource);
  
          if ($result === false) {
              throw new SocketException($resource);
          }
  
          return $result;
      }
code_tokens: protected static function exceptionOnFalse ( $ resource , callable $ closure ) { $ result = $ closure ( $ resource ) ; if ( $ result === false ) { throw new SocketException ( $ resource ) ; } return $ result ; }
docstring: Performs the closure function.  If it returns false, throws a SocketException using the provided resource.
  
  @param resource $resource Socket Resource
  @param callable $closure  A function that takes 1 parameter (a socket resource)
  
  @throws SocketException
docstring_tokens: Performs the closure function . If it returns false throws a SocketException using the provided resource .