Consult SIZEOF_ZEND_LONG instead of SIZEOF_LONG

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major - P3
    • 1.8.0-beta2, 1.8.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      SIZEOF_ZEND_LONG more accurately indicates the size of PHP's integer values, while SIZEOF_LONG likely points to the platform itself (may not necessarily match). Preferring SIZEOF_ZEND_LONG may avoid some issues on Windows, as found while working on AppVeyor testing in PHPC-1131.

      This is also the real value of PHP_INT_SIZE, which we frequently consult in tests.

      This constant dates back to 28b7a03 and is available in all versions of PHP 7.

            Assignee:
            Jeremy Mikola
            Reporter:
            Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: