Sophie

Sophie

distrib > Mageia > 4 > i586 > by-pkgid > f800694edefe91adea2624f711a41a2d > files > 1338

php-manual-en-5.5.7-1.mga4.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>Returns a numerically indexed array containing all defined timezone identifiers</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="datetimezone.listabbreviations.html">DateTimeZone::listAbbreviations</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="class.dateinterval.html">DateInterval</a></div>
 <div class="up"><a href="class.datetimezone.html">DateTimeZone</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="datetimezone.listidentifiers" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">DateTimeZone::listIdentifiers</h1>
  <h1 class="refname">timezone_identifiers_list</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.2.0)</p><p class="refpurpose"><span class="refname">DateTimeZone::listIdentifiers</span> -- <span class="refname">timezone_identifiers_list</span> &mdash; <span class="dc-title">Returns a numerically indexed array containing all defined timezone identifiers</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-datetimezone.listidentifiers-description">
  <h3 class="title">Description</h3>
  <p class="para">Object oriented style</p>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="modifier">static</span> <span class="type">array</span> <span class="methodname"><strong>DateTimeZone::listIdentifiers</strong></span>
    ([ <span class="methodparam"><span class="type">int</span> <code class="parameter">$what</code><span class="initializer"> = DateTimeZone::ALL</span></span>
   [, <span class="methodparam"><span class="type">string</span> <code class="parameter">$country</code><span class="initializer"> = <strong><code>NULL</code></strong></span></span>
  ]] )</div>

  <p class="para rdfs-comment">Procedural style</p>
  <div class="methodsynopsis dc-description">
   <span class="type">array</span> <span class="methodname"><a href="function.timezone-identifiers-list.html" class="methodname">timezone_identifiers_list</a></span>
    ([ <span class="methodparam"><span class="type">int</span> <code class="parameter">$what</code><span class="initializer"> = DateTimeZone::ALL</span></span>
   [, <span class="methodparam"><span class="type">string</span> <code class="parameter">$country</code><span class="initializer"> = <strong><code>NULL</code></strong></span></span>
  ]] )</div>

 </div>


 <div class="refsect1 parameters" id="refsect1-datetimezone.listidentifiers-parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">
   <dl>

    <dt>

     <span class="term"><em><code class="parameter">what</code></em></span>
     <dd>

      <p class="para">
       One of <a href="class.datetimezone.html" class="classname">DateTimeZone</a> class constants.
      </p>
     </dd>

    </dt>

    <dt>

     <span class="term"><em><code class="parameter">country</code></em></span>
     <dd>

      <p class="para">
       A two-letter ISO 3166-1 compatible country code.
      </p>
      <blockquote class="note"><p><strong class="note">Note</strong>: 
       <span class="simpara">
        This option is only used when <em><code class="parameter">what</code></em> is set to
        <strong><code>DateTimeZone::PER_COUNTRY</code></strong>.
       </span>
      </p></blockquote>
     </dd>

    </dt>

   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-datetimezone.listidentifiers-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   Returns array on success or <strong><code>FALSE</code></strong> on failure.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-datetimezone.listidentifiers-changelog">
  <h3 class="title">Changelog</h3>
  <p class="para">
   <table class="doctable informaltable">
    
     <thead>
      <tr>
       <th>Version</th>
       <th>Description</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td>5.3.0</td>
       <td>
        Added the optional <em><code class="parameter">what</code></em> and
        <em><code class="parameter">country</code></em> parameters.
       </td>
      </tr>

     </tbody>
    
   </table>

  </p>
 </div>

 
 <div class="refsect1 examples" id="refsect1-datetimezone.listidentifiers-examples">
  <h3 class="title">Examples</h3>
  <p class="para">
   <div class="example" id="example-2284">
    <p><strong>Example #1 A  <span class="function"><a href="function.timezone-identifiers-list.html" class="function">timezone_identifiers_list()</a></span> example</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />$timezone_identifiers&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">DateTimeZone</span><span style="color: #007700">::</span><span style="color: #0000BB">listIdentifiers</span><span style="color: #007700">();<br />for&nbsp;(</span><span style="color: #0000BB">$i</span><span style="color: #007700">=</span><span style="color: #0000BB">0</span><span style="color: #007700">;&nbsp;</span><span style="color: #0000BB">$i&nbsp;</span><span style="color: #007700">&lt;&nbsp;</span><span style="color: #0000BB">5</span><span style="color: #007700">;&nbsp;</span><span style="color: #0000BB">$i</span><span style="color: #007700">++)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"</span><span style="color: #0000BB">$timezone_identifiers</span><span style="color: #007700">[</span><span style="color: #0000BB">$i</span><span style="color: #007700">]</span><span style="color: #DD0000">\n"</span><span style="color: #007700">;<br />}<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

    <div class="example-contents"><p>The above example will output
something similar to:</p></div>
    <div class="example-contents screen">
<div class="cdata"><pre>
Africa/Abidjan
Africa/Accra
Africa/Addis_Ababa
Africa/Algiers
Africa/Asmara
</pre></div>
    </div>
   </div>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-datetimezone.listidentifiers-seealso">
  <h3 class="title">See Also</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"> <span class="function"><a href="function.timezone-abbreviations-list.html" class="function" rel="rdfs-seeAlso">timezone_abbreviations_list()</a> - Alias of DateTimeZone::listAbbreviations</span></li>
   </ul>
  </p>
 </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="datetimezone.listabbreviations.html">DateTimeZone::listAbbreviations</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="class.dateinterval.html">DateInterval</a></div>
 <div class="up"><a href="class.datetimezone.html">DateTimeZone</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>