[stable31] fix(32bit): use PHP_INT_MAX where needed
#52512
Merged
PHP_INT_MAX where needed
#52512