Sophie

Sophie

distrib > Mageia > 7 > armv7hl > by-pkgid > 2b917e0437961edec048f1d15e2d7449 > files > 6610

php-manual-en-7.2.11-1.mga7.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Check if a stream is a TTY</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.stream-is-local.html">stream_is_local</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.stream-notification-callback.html">stream_notification_callback</a></div>
 <div class="up"><a href="ref.stream.html">Stream Functions</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.stream-isatty" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">stream_isatty</h1>
  <p class="verinfo">(PHP 7 &gt;= 7.2.0)</p><p class="refpurpose"><span class="refname">stream_isatty</span> &mdash; <span class="dc-title">Check if a stream is a TTY</span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-function.stream-isatty-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">bool</span> <span class="methodname"><strong>stream_isatty</strong></span>
    ( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$stream</code></span>
   )</div>

  <p class="para rdfs-comment">
   Determines if stream <code class="parameter">stream</code> refers to a valid terminal type device.
   This is a more portable version of <span class="function"><a href="function.posix-isatty.html" class="function">posix_isatty()</a></span>, since it works on Windows systems too.
  </p>
 </div>

 
 <div class="refsect1 parameters" id="refsect1-function.stream-isatty-parameters">
  <h3 class="title">Parameters</h3>
  <dl>

   
    <dt>
<code class="parameter">stream</code></dt>

    <dd>

     <p class="para">
      
     </p>
    </dd>

   
  </dl>

 </div>

 
 <div class="refsect1 returnvalues" id="refsect1-function.stream-isatty-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   Returns <strong><code>TRUE</code></strong> on success or <strong><code>FALSE</code></strong> on failure.
  </p>
 </div>

 
 <div class="refsect1 examples" id="refsect1-function.stream-isatty-examples">
  <h3 class="title">Examples</h3>
  <p class="para">
   <div class="example" id="stream-context-get-options.example.basic">
    <p><strong>Example #1 <span class="function"><strong>stream_isatty()</strong></span> example</strong></p>
    <div class="example-contents"><p>
     This command can be used to determine if a standard output / standard error stream is redirected to a file.
    </p></div>
    <div class="example-contents"><div class="shcode"><pre class="shcode">php -r &quot;var_export(stream_isatty(STDERR));&quot;</pre>
</div></div>

    <div class="example-contents"><p>The above example will output
something similar to:</p></div>
    <div class="example-contents screen"><br />
     true<br />
    </div>
    <div class="example-contents"><div class="shcode"><pre class="shcode">php -r &quot;var_export(stream_isatty(STDERR));&quot; 2&gt;output.txt</pre>
</div></div>

    <div class="example-contents"><p>The above example will output
something similar to:</p></div>
    <div class="example-contents screen"><br />
     false<br />
    </div>
   </div>
   </p>
 </div>

 
</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.stream-is-local.html">stream_is_local</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.stream-notification-callback.html">stream_notification_callback</a></div>
 <div class="up"><a href="ref.stream.html">Stream Functions</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>