Uploaded image for project: 'PHP Driver: Library'
  1. PHP Driver: Library
  2. PHPLIB-588

Use get_debug_type for reporting class and primitive type info

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 1.8.0-rc1, 1.8.0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      In this comment, andreas.braun pointed out that PHP 8's get_debug_type can be used to replace the following:

      is_object($expected) ? get_class($expected) : gettype($expected); 

      The above code is used throughout the library and its test suite. For earlier versions of PHP, we can rely on symfony/polyfill.

            Assignee:
            andreas.braun@mongodb.com Andreas Braun
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: