code: public function putBlockList($containerName = '', $blobName = '', $blockList = array(), $metadata = array(), $leaseId = null, $additionalHeaders = array())
      {
          Assertion::notEmpty($containerName, 'Container name is not specified');
          self::assertValidContainerName($containerName);
          Assertion::notEmpty($blobName, 'Blob name is not specified.');
          Assertion::notEmpty($blockList, 'Block list does not contain any elements.');
          self::assertValidRootContainerBlobName($containerName, $blobName);
  
          $blocks = '';
          foreach ($blockList as $block) {
              $blocks .= '  <Latest>' . base64_encode($block) . '</Latest>' . "\n";
          }
  
          $fileContents = utf8_encode(implode("\n", array(
              '<?xml version="1.0" encoding="utf-8"?>',
              '<BlockList>',
              $blocks,
              '</BlockList>'
          )));
  
          $headers = array();
          if (!is_null($leaseId)) {
              $headers['x-ms-lease-id'] = $leaseId;
          }
          $headers = array_merge($headers, $this->generateMetadataHeaders($metadata));
  
          foreach ($additionalHeaders as $key => $value) {
              $headers[$key] = $value;
          }
  
          $resourceName = self::createResourceName($containerName , $blobName);
  
          $response = $this->performRequest($resourceName, array('comp' => 'blocklist'), 'PUT', $headers, false, $fileContents, self::RESOURCE_BLOB, self::PERMISSION_WRITE);
          if ( ! $response->isSuccessful()) {
              throw new BlobException($this->getErrorMessage($response, 'Resource could not be accessed.'));
          }
      }
docs: Put block list
  
  @param string $containerName      Container name
  @param string $blobName           Blob name
  @param array $blockList           Array of block identifiers
  @param array  $metadata           Key/value pairs of meta data
  @param string $leaseId            Lease identifier
  @param array  $additionalHeaders  Additional headers. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.
  @throws BlobException