<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/migration70.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'fr',
  ),
  'this' => 
  array (
    0 => 'migration70.deprecated.php',
    1 => 'Les fonctionnalit&eacute;s d&eacute;pr&eacute;ci&eacute;es dans PHP 7.0.x',
    2 => 'Les fonctionnalit&eacute;s d&eacute;pr&eacute;ci&eacute;es dans PHP 7.0.x',
  ),
  'up' => 
  array (
    0 => 'migration70.php',
    1 => 'Migration de PHP 5.6.x vers PHP 7.0.x',
  ),
  'prev' => 
  array (
    0 => 'migration70.new-features.php',
    1 => 'Nouvelles fonctionnalit&eacute;s',
  ),
  'next' => 
  array (
    0 => 'migration70.changed-functions.php',
    1 => 'Fonctions modifi&eacute;es',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'fr',
    'path' => 'appendices/migration70/deprecated.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="migration70.deprecated" class="sect1">
 <h2 class="title">Les fonctionnalités dépréciées dans PHP 7.0.x</h2>


 

 <div class="sect2" id="migration70.deprecated.php4-constructors">
  <h3 class="title">Constructeurs de PHP 4</h3>

  <p class="para">
   Les constructeurs de style PHP 4 (méthodes ayant le même nom que la classe dans
   laquelle elles sont définies) sont obsolètes et seront supprimés à l’avenir. PHP 7
   émet <strong><code><a href="errorfunc.constants.php#constant.e-deprecated">E_DEPRECATED</a></code></strong> si le constructeur de PHP 4 est le seul
   constructeur défini dans la classe. Les classes qui implémentent une méthode
   <span class="function"><strong>__construct()</strong></span> ne sont pas affectées par ce changement.
  </p>

  <div class="informalexample">
   <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /></span><span style="color: #007700">class </span><span style="color: #0000BB">foo </span><span style="color: #007700">{<br />    function </span><span style="color: #0000BB">foo</span><span style="color: #007700">() {<br />        echo </span><span style="color: #DD0000">'Je suis le constructeur'</span><span style="color: #007700">;<br />    }<br />}<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
   </div>

   <p class="para">L&#039;exemple ci-dessus va afficher :</p>
   <div class="example-contents screen">
<div class="cdata"><pre>
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; foo has a deprecated constructor in example.php on line 3
</pre></div>
   </div>
  </div>
 </div>

 <div class="sect2" id="migration70.deprecated.static-calls">
  <h3 class="title">Les appels statiques à des méthodes non statiques</h3>

  <p class="para">
   Les appels <a href="language.oop5.static.php" class="link">statiques</a> aux méthodes
   qui ne sont pas déclarées avec le mot-clé <strong class="command">static</strong> sont 
   dépréciés et peuvent être supprimés dans le futur.
  </p>

  <div class="informalexample">
   <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /></span><span style="color: #007700">class </span><span style="color: #0000BB">foo </span><span style="color: #007700">{<br />    function </span><span style="color: #0000BB">bar</span><span style="color: #007700">() {<br />        echo </span><span style="color: #DD0000">'Je ne suis pas statique !'</span><span style="color: #007700">;<br />    }<br />}<br /><br /></span><span style="color: #0000BB">foo</span><span style="color: #007700">::</span><span style="color: #0000BB">bar</span><span style="color: #007700">();<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
   </div>

   <p class="para">L&#039;exemple ci-dessus va afficher :</p>
   <div class="example-contents screen">
<div class="cdata"><pre>
Deprecated: Non-static method foo::bar() should not be called statically in - on line 8
Je ne suis pas statique !
</pre></div>
   </div>
  </div>
 </div>

 <div class="sect2" id="migration70.deprecated.pwshash-salt-option">
  <h3 class="title">L&#039;option salt de la fonction <span class="function"><a href="function.password-hash.php" class="function">password_hash()</a></span></h3>

  <p class="para">
   L’option salt de la fonction <span class="function"><a href="function.password-hash.php" class="function">password_hash()</a></span> est dépréciée
   pour éviter que les développeurs ne génèrent leurs propres salts
   (habituellement non sécurisés). La fonction elle-même génère un salt
   cryptographiquement sécurisé en l’absence d’un salt fourni par le
   développeur, la génération d’un salt sur mesure n’est donc plus nécessaire.
  </p>
 </div>

 <div class="sect2" id="migration70.deprecated.capture-session-meta">
  <h3 class="title">L&#039;option <code class="literal">capture_session_meta</code> du contexte SSL</h3>

  <p class="para">
   L&#039;option <code class="literal">capture_session_meta</code> du contexte SSL est dépréciée.
   Les métadonnées SSL sont maintenant disponibles à travers la fonction 
   <span class="function"><a href="function.stream-get-meta-data.php" class="function">stream_get_meta_data()</a></span>.
  </p>
 </div>

 <div class="sect2" id="migration70.deprecated.ldap">
  <h3 class="title">Dépréciation dans <a href="book.ldap.php" class="link">LDAP</a></h3>
   <p class="simpara">
    La fonction suivante est dépréciée :
   </p>

   <ul class="itemizedlist">
    <li class="listitem">
     <span class="simpara">
      <span class="function"><a href="function.ldap-sort.php" class="function">ldap_sort()</a></span>
     </span>
    </li>
   </ul>
 </div>
</div><?php manual_footer($setup); ?>