Other changes

Apprise on arithmetic with invalid strings

New E_WARNING and E_NOTICE errors have been introduced when invalid strings are coerced using the arithmetic operators (+ - * / ** % << >> | & ^). An E_NOTICE is emitted when the string can be partially converted to a sensical numeric, and an E_WARNING is emitted when the string cannot be converted at all to a sensical numeric.

<?php
'1b' 'something';

Результат выполнения данного примера:

Notice: A non well formed numeric value encountered in %s on line %d
Warning: A non-numeric value encountered in %s on line %d

Warn on octal overflow

Previously, 3 octit octals could overflow without warning the programmer. Now, an E_WARNING will be emitted on such overflows (with the previous overflow behavior remaining the same).

<?php
var_dump
("\500");

Результат выполнения данного примера:

Warning: Octal escape sequence overflow \500 is greater than \377 in %s on line %d
string(1) "@"

Inconsistency Fixes to $this

Whilst $this is considered a special variable in PHP, it lacked proper checks to ensure it wasn't used as a variable name or reassigned. This has now been rectified to ensure that `$this` cannot be a user-defined variable, reassigned to a different value, or be globalised.

Session ID generation without hashing

Session IDs will no longer be hashed upon generation. With this change brings about the removal of the following four ini settings:

  • session.entropy_file
  • session.entropy_length
  • session.hash_function
  • session.hash_bits_per_character

And the addition of the following two ini settings:

  • session.sid_length - defines the length of the session ID, defaulting to 32 characters for backwards compatibility)
  • session.sid_bits_per_character - defines the number of bits to be stored per character (i.e. increases the range of characters that can be used in the session ID), defaulting to 4 for backwards compatibility

Коментарии

Автор:
Note that using Incrementing/Decrementing operators on string is legal 
<?php
$str 
"";
echo ++
$str// output: 1
?>
2018-02-27 07:47:20
http://php5.kiev.ua/manual/ru/migration71.other-changes.html

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