<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/migration56.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'en',
  ),
  'this' => 
  array (
    0 => 'migration56.deprecated.php',
    1 => 'Deprecated features in PHP 5.6.x',
    2 => 'Deprecated features in PHP 5.6.x',
  ),
  'up' => 
  array (
    0 => 'migration56.php',
    1 => 'Migrating from PHP 5.5.x to PHP 5.6.x',
  ),
  'prev' => 
  array (
    0 => 'migration56.new-features.php',
    1 => 'New features',
  ),
  'next' => 
  array (
    0 => 'migration56.changed-functions.php',
    1 => 'Changed functions',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'appendices/migration56/deprecated.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="migration56.deprecated" class="sect1">
 <h2 class="title">Deprecated features in PHP 5.6.x</h2>

 <div class="sect2" id="migration56.deprecated.incompatible-context">
  <h3 class="title">Calls from incompatible context</h3>

  <p class="para">
   Methods called from an incompatible context are now deprecated, and will
   generate <strong><code><a href="errorfunc.constants.php#constant.e-deprecated">E_DEPRECATED</a></code></strong> errors when invoked instead of
   <strong><code><a href="errorfunc.constants.php#constant.e-strict">E_STRICT</a></code></strong>. Support for these calls will be removed in
   a future version of PHP.
  </p>

  <p class="para">
   An example of such a call is:
  </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">A </span><span style="color: #007700">{<br />    function </span><span style="color: #0000BB">f</span><span style="color: #007700">() { echo </span><span style="color: #0000BB">get_class</span><span style="color: #007700">(</span><span style="color: #0000BB">$this</span><span style="color: #007700">); }<br />}<br /><br />class </span><span style="color: #0000BB">B </span><span style="color: #007700">{<br />    function </span><span style="color: #0000BB">f</span><span style="color: #007700">() { </span><span style="color: #0000BB">A</span><span style="color: #007700">::</span><span style="color: #0000BB">f</span><span style="color: #007700">(); }<br />}<br /><br />(new </span><span style="color: #0000BB">B</span><span style="color: #007700">)-&gt;</span><span style="color: #0000BB">f</span><span style="color: #007700">();<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
   </div>

   <p class="para">The above example will output:</p>
   <div class="example-contents screen">
<div class="cdata"><pre>
Deprecated: Non-static method A::f() should not be called statically, assuming $this from incompatible context in - on line 7
B
</pre></div>
   </div>
  </div>
 </div>

 <div class="sect2" id="migration56.deprecated.raw-post-data">
  <h3 class="title"><var class="varname">$HTTP_RAW_POST_DATA</var> and <code class="literal">always_populate_raw_post_data</code></h3>

  <p class="para">
   <code class="literal">always_populate_raw_post_data</code>
   will now generate an <strong><code><a href="errorfunc.constants.php#constant.e-deprecated">E_DEPRECATED</a></code></strong> error when
   <var class="varname">$HTTP_RAW_POST_DATA</var> is populated.
   New code should use
   <a href="wrappers.php.php#wrappers.php.input" class="link"><code class="literal">php://input</code></a>
   instead of <var class="varname">$HTTP_RAW_POST_DATA</var>, which will be removed
   in a future release. You can opt in for the new behaviour (in which
   <var class="varname">$HTTP_RAW_POST_DATA</var> is never defined hence no
   <strong><code><a href="errorfunc.constants.php#constant.e-deprecated">E_DEPRECATED</a></code></strong> error will be generated) by setting
   <code class="literal">always_populate_raw_post_data</code>
   to <code class="literal">-1</code>.
  </p>
 </div>

 <div class="sect2" id="migration56.deprecated.iconv-mbstring-encoding">
  <h3 class="title"><a href="book.iconv.php" class="link">iconv</a> and <a href="book.mbstring.php" class="link">mbstring</a> encoding settings</h3>

  <p class="para">
   The <a href="book.iconv.php" class="link">iconv</a> and
   <a href="book.mbstring.php" class="link">mbstring</a> configuration options related
   to encoding have been deprecated in favour of
   <a href="ini.core.php#ini.default-charset" class="link"><code class="parameter">default_charset</code></a>.
   The deprecated options are:
  </p>

  <ul class="itemizedlist">
   <li class="listitem">
    <span class="simpara">
     <a href="iconv.configuration.php#ini.iconv.input-encoding" class="link"><code class="parameter">iconv.input_encoding</code></a>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <a href="iconv.configuration.php#ini.iconv.output-encoding" class="link"><code class="parameter">iconv.output_encoding</code></a>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <a href="iconv.configuration.php#ini.iconv.internal-encoding" class="link"><code class="parameter">iconv.internal_encoding</code></a>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <a href="mbstring.configuration.php#ini.mbstring.http-input" class="link"><code class="parameter">mbstring.http_input</code></a>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <a href="mbstring.configuration.php#ini.mbstring.http-output" class="link"><code class="parameter">mbstring.http_output</code></a>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <a href="mbstring.configuration.php#ini.mbstring.internal-encoding" class="link"><code class="parameter">mbstring.internal_encoding</code></a>
    </span>
   </li>
  </ul>
 </div>
</div><?php manual_footer($setup); ?>