Other changes
Notices and warnings on arithmetic with invalid strings
New E_WARNING
and E_NOTICE
errors
have been introduced when invalid strings are coerced using operators
expecting numbers (+ -
* / **
% << >>
| & ^) or their
assignment equivalents. An E_NOTICE
is emitted when the
string begins with a numeric value but contains trailing non-numeric
characters, and an E_WARNING
is emitted when the string
does not contain a numeric value.
<?php
'1b' + 'something';
The above example will output:
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 escape sequence overflow
Previously, 3-octet octal string escape sequences would overflow silently.
Now, they will still overflow, but E_WARNING
will be
emitted.
<?php
var_dump("\500");
The above example will output:
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
Changes to INI file handling
-
precision
-
If the value is set to -1, then the dtoa mode 0 is used. The default value is still 14.
-
serialize_precision
-
If the value is set to -1, then the dtoa mode 0 is used. The value -1 is now used by default.
-
gd.jpeg_ignore_warning
-
The default of this php.ini setting has been changed to 1, so by default libjpeg warnings are ignored.
-
opcache.enable_cli
-
The default of this php.ini setting has been changed to 1 (enabled) in PHP 7.1.2.
More informative TypeError messages when NULL
is allowed
TypeError exceptions for arg_info type checks will
now provide more informative error messages. If the parameter type or return
type accepts NULL
(by either having a default value of NULL
or being a
nullable type), then the error message will now mention this with a message
of "must be ... or null" or "must ... or be null."
Vertaling niet beschikbaar
De PHP-handleiding is nog niet in het Nederlands vertaald, dus het scherm is in het Engels. Als u wilt, kunt u het ook in het Frans of in het Duits raadplegen.
Als je de moed voelt, kun je je vertaling aanbieden ;-)
Nederlandse vertaling
U hebt gevraagd om deze site in het Nederlands te bezoeken. Voor nu wordt alleen de interface vertaald, maar nog niet alle inhoud.Als je me wilt helpen met vertalingen, is je bijdrage welkom. Het enige dat u hoeft te doen, is u op de site registreren en mij een bericht sturen waarin u wordt gevraagd om u toe te voegen aan de groep vertalers, zodat u de gewenste pagina's kunt vertalen. Een link onderaan elke vertaalde pagina geeft aan dat u de vertaler bent en heeft een link naar uw profiel.
Bij voorbaat dank.
Document heeft de 30/01/2003 gemaakt, de laatste keer de 26/10/2018 gewijzigd
Bron van het afgedrukte document:https://www.gaudry.be/nl/php-rf-migration71.other-changes.html
De infobrol is een persoonlijke site waarvan de inhoud uitsluitend mijn verantwoordelijkheid is. De tekst is beschikbaar onder CreativeCommons-licentie (BY-NC-SA). Meer info op de gebruiksvoorwaarden en de auteur.
Referenties
Deze verwijzingen en links verwijzen naar documenten die geraadpleegd zijn tijdens het schrijven van deze pagina, of die aanvullende informatie kunnen geven, maar de auteurs van deze bronnen kunnen niet verantwoordelijk worden gehouden voor de inhoud van deze pagina.
De auteur Deze site is als enige verantwoordelijk voor de manier waarop de verschillende concepten, en de vrijheden die met de referentiewerken worden genomen, hier worden gepresenteerd. Vergeet niet dat u meerdere broninformatie moet doorgeven om het risico op fouten te verkleinen.