<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.splfileinfo.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'ja',
  ),
  'this' => 
  array (
    0 => 'splfileinfo.getmtime.php',
    1 => 'SplFileInfo::getMTime',
    2 => '最終変更時刻を取得する',
  ),
  'up' => 
  array (
    0 => 'class.splfileinfo.php',
    1 => 'SplFileInfo',
  ),
  'prev' => 
  array (
    0 => 'splfileinfo.getlinktarget.php',
    1 => 'SplFileInfo::getLinkTarget',
  ),
  'next' => 
  array (
    0 => 'splfileinfo.getowner.php',
    1 => 'SplFileInfo::getOwner',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'ja',
    'path' => 'reference/spl/splfileinfo/getmtime.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="splfileinfo.getmtime" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">SplFileInfo::getMTime</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.1.2, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">SplFileInfo::getMTime</span> &mdash; <span class="dc-title">最終変更時刻を取得する</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-splfileinfo.getmtime-description">
  <h3 class="title">説明</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>SplFileInfo::getMTime</strong></span>(): <span class="type"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span>|<span class="type"><a href="language.types.singleton.php" class="type false">false</a></span></span></div>

  <p class="para rdfs-comment">
   ファイルの中身が変更された時刻を返します。返される時刻は Unix タイムスタンプ形式となります。
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-splfileinfo.getmtime-parameters">
  <h3 class="title">パラメータ</h3>
  <p class="para">この関数にはパラメータはありません。</p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-splfileinfo.getmtime-returnvalues">
  <h3 class="title">戻り値</h3>
  <p class="para">
   ファイルの最終変更時刻を Unix タイムスタンプで返します。
   失敗時に <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> を返します。
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-splfileinfo.getmtime-examples">
  <h3 class="title">例</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>例1 <span class="methodname"><strong>SplFileInfo::getMTime()</strong></span> の例</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />$info </span><span style="color: #007700">= new </span><span style="color: #0000BB">SplFileInfo</span><span style="color: #007700">(</span><span style="color: #DD0000">'example.jpg'</span><span style="color: #007700">);<br />echo </span><span style="color: #DD0000">'Last modified at ' </span><span style="color: #007700">. </span><span style="color: #0000BB">date</span><span style="color: #007700">(</span><span style="color: #DD0000">'g:i a'</span><span style="color: #007700">, </span><span style="color: #0000BB">$info</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getMTime</span><span style="color: #007700">());<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

    <div class="example-contents"><p>上の例の出力は、
たとえば以下のようになります。</p></div>
    <div class="example-contents screen">
<div class="examplescode"><pre class="examplescode">Last modified at 1:49 pm</pre>
</div>
    </div>
   </div>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-splfileinfo.getmtime-seealso">
  <h3 class="title">参考</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.filemtime.php" class="function" rel="rdfs-seeAlso">filemtime()</a> - ファイルの更新時刻を取得する</span></li>
    <li><span class="methodname"><a href="splfileinfo.getatime.php" class="methodname" rel="rdfs-seeAlso">SplFileInfo::getATime()</a> - ファイルの最終アクセス時刻を取得する</span></li>
    <li><span class="methodname"><a href="splfileinfo.getctime.php" class="methodname" rel="rdfs-seeAlso">SplFileInfo::getCTime()</a> - inode 変更時刻を取得する</span></li>
   </ul>
  </p>
 </div>


</div><?php manual_footer($setup); ?>