Deprecated features in PHP 5.6.x

Calls from incompatible context

Methods called from an incompatible context are now deprecated, and will generate E_DEPRECATED errors when invoked instead of E_STRICT. Support for these calls will be removed in a future version of PHP.

An example of such a call is:

<?php
class {
    function 
f() { echo get_class($this); }
}

class 
{
    function 
f() { A::f(); }
}

(new 
B)->f();
?>

The above example will output:

Deprecated: Non-static method A::f() should not be called statically, assuming $this from incompatible context in - on line 7
B

$HTTP_RAW_POST_DATA and always_populate_raw_post_data

always_populate_raw_post_data will now generate an E_DEPRECATED error when enabled. New code should use php://input instead of $HTTP_RAW_POST_DATA, which will be removed in a future release. You can opt in for the new behaviour (in which $HTTP_RAW_POST_DATA is never defined) by setting always_populate_raw_post_data to -1.

Коментарии

<?php
    ini_set
('always_populate_raw_post_data',-1);
   
$HTTP_RAW_POST_DATA file_get_contents('php://input');
    echo 
$HTTP_RAW_POST_DATA;
?>
2015-11-05 20:22:03
http://php5.kiev.ua/manual/ru/migration56.deprecated.html

    Поддержать сайт на родительском проекте КГБ