* ext/gmp: Make GMP class final
RFC: https://wiki.php.net/rfc/gmp-final
* Update UPGRADING
Co-authored-by: Peter Kokot <peterkokot@gmail.com>
---------
Co-authored-by: Peter Kokot <peterkokot@gmail.com>
Implements a proper constructor for GMP as discussed in both GH-10158 and https://externals.io/message/119216.
Fixes GH-10155
Closes GH-10225
Signed-off-by: George Peter Banyard <girgias@php.net>
@cname currently refers to the constant name in C. However, it is not always a (constant) name, but sometimes a function invocation, so naming it as @cvalue would be more appropriate.
GMP directly implements internal serialize/unserialize handlers
rather than going through the Serializable interface, so it ended
up being missed when adding the new __serialize()/__unserialize()
methods to other classes.
The serialization format is similar to before, but uses hex instead
of decimal encoding and omits the members if not used (which should
be almost always).
This changes GMP functions to accept a GMP|string|int union with
standard semantics (and thus also uses it in function signatures).
Relative to the previous behavior, this means that GMP functions
in weak mode now also accept float and null, and in strict mode no
longer accept bool, and have full type information.
Closes GH-6139.
* get_parent_class() argument is optional
* Mark array_filter() $callback as optional
* The $base of gmp_strval() is optional
* DateTime constructor also accepts zero arguments
* hash_update_file() stream context is optional
* xmlwriter_write_dtd_entity() $isparam argument is optional