Skip to content

Fix strict warning for rand int sizes #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 1, 2020

Conversation

craig-davis
Copy link
Contributor

Problem

The library uses floats for the max rand number size and causes warnings in php strict mode

Solution

Convert to use the PHP_INT_MAX.

Notes

This will cause the number to be different based on system architecture. PHP_INT_MAX is 9223372036854775807 on 64 bit systems.

@craig-davis craig-davis merged commit 5ac03f0 into master Oct 1, 2020
@craig-davis craig-davis deleted the php-max-int-safe-mode branch October 1, 2020 22:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant