title: Notice: Use of undefined constant STDOUT - assumed 'STDOUT'
body: <p>I am trying to set up Amazon Aws Php SDK in Xampp.</p>
  
  <p>After installing the SDK, I am trying to download a bucket from Amazon S3, using the following code.</p>
  
  <pre><code>&lt;?php
  
  error_reporting(-1);
  ini_set('display_errors', 'on');
  
  include_once ('aws/aws-autoloader.php');
  use Aws\S3\S3Client;
  
  $client = S3Client::factory(array(
       'key'    =&gt; '__my__key__',
       'secret' =&gt; '__secret__key__'
  ));
  
  $destination = 'downloaded_bucket';
  $source_bucket = '__my__bucket__name';
  $key_prefix = '';
  $options = array('debug'=&gt;true);
  
  $client -&gt; downloadBucket($destination,$source_bucket,$key_prefix,$options);
  ?&gt;
  </code></pre>
  
  <p>Now on executing this php from my browser, I get the following error.</p>
  
  <pre><code>Notice: Use of undefined constant STDOUT - assumed 'STDOUT' in __my__path\Aws\S3\Sync\AbstractSyncBuilder.php on line 294
  STDOUT
  Warning: fwrite() expects parameter 1 to be resource, string given in __my__path\Aws\S3\Sync\DownloadSyncBuilder.php on line 124
  STDOUT
  Warning: fwrite() expects parameter 1 to be resource, string given in __my__path\Aws\S3\Sync\DownloadSyncBuilder.php on line 124
  STDOUT
  Warning: fwrite() expects parameter 1 to be resource, string given in __my__path\Aws\S3\Sync\DownloadSyncBuilder.php on line 124
  </code></pre>
  
  <p>The final 3 warnings occur because of the first Notice, because instead of resource, the string 'STDOUT' is passed. </p>
  
  <p>What is the reason for the first notice? 
  The code segment for this notice is </p>
  
  <pre><code>if ($this-&gt;debug) {
              $this-&gt;addDebugListener($sync, is_bool($this-&gt;debug) ? STDOUT : $this-&gt;debug);
          }
  </code></pre>
  
  <p>which is part of the SDK.
  And the culprit for the fwrite warning code is the addDebugListener function </p>
  
  <pre><code>protected function addDebugListener(AbstractSync $sync, $resource)
      {
         //blah blah
         fwrite($resource, "Downloading {$from} -&gt; {$to}\n");
         //blah blah
      }
  </code></pre>
  
  <p>My PHP version is 5.4.16</p>