Refactor ZEND_LONG_MAX/MIN checks into ZEND_DOUBLE_FITS_LONG()