Diophantine solution here since it can vary based
on the libgmp version we are linking against and
in general there are almost always multiple valid
solutions
Diophantine solution here since it can vary based
on the libgmp version we are linking against and
in general there are almost always multiple valid
solutions
* PHP-5.6:
update NEWS and UPGRADING
Upated NEWS
Address issues raised by @nikic
Make sure min < max
Mersenne Twister was added in GMP 4.2
Add test files
Add gmp_random_bits(bits) and gmp_random_range(min, max)
Change GMPs default PRNG to Mersenne Twister
Conflicts:
ext/gmp/gmp.c
- Thread safety on rand init function.
- Ret false on validation failure
- Add _dep of temp_a to temp_b
- Special case int sized min values
- More tests!
0x and 0b prefix is now only handled if either no base is given
or if the base is 16 (0x) or 2 (0b). Always handling it is incorrect
because 0x and 0b are perfectly valid numbers in other bases.
Fixed recognition of the operator
Added opcode, still doing multiply instead of pow()
opcode now always returns int(42)
The right answer, but always a float
Yanked code from pow() implementation.
Should not handle negative long as exponent ourselves
Added test cases from pow()
Moved precedence higher than '~'
Added GMP operator overloading
Added ZEND_ASSIGN_POW (**=) operator.
Added pow() as a language construct.
Adjusted test cases for changed precedence.
Reduced pow() to shell function around ZEND_API pow_function()
Reduced test case to only contain edge cases
Added overloading test case
Moved unary minus above T_POW
Revert "Added pow() as a language construct."
Bad bad bad idea.
This reverts commit f60b98cf7a8371233d800a6faa286ddba4432d02.
Reverted unary minus behaviour due to previous revert.
Convert arrays to int(0)
Exponent with array as a base becomes int(0)
Rebase against master
Fixed tokenizer test case
Rather than using get_properties and __wakeup for serialization
the code now uses Serializable::serialize() and
Serializable::unserialize(). The get_properties handler is switched
to a get_debug_info handler. Thus get_gc will now return only
the normal properties and not do any modifications, thus fixing
the leak. This also avoids a $num property from being publicly
visible after the object was dumped or serialized, so that's an
extra plus.