title: exif_read_data on PHP 7.2 doesn't return all metadata
body: <p>On PHP 7.2, the built-in function <code>exif_read_data</code> returns different information to PHP 7.1</p>
  
  <p>This is what I get when I use 7.2:</p>
  
  <p><code>php -r 'var_export(exif_read_data("x.jpg", "ANY_TAG"));'</code></p>
  
  <pre><code>array (
    'FileName' =&gt; 'x.jpg',
    'FileDateTime' =&gt; 1543144462,
    'FileSize' =&gt; 3564506,
    'FileType' =&gt; 2,
    'MimeType' =&gt; 'image/jpeg',
    'SectionsFound' =&gt; 'ANY_TAG, IFD0, EXIF',
    'COMPUTED' =&gt; 
    array (
      'html' =&gt; 'width="3968" height="2976"',
      'Height' =&gt; 2976,
      'Width' =&gt; 3968,
      'IsColor' =&gt; 1,
      'ByteOrderMotorola' =&gt; 1,
    ),
    'ImageWidth' =&gt; 3968,
    'ImageLength' =&gt; 2976,
    'BitsPerSample' =&gt; 
    array (
      0 =&gt; 8,
      1 =&gt; 8,
      2 =&gt; 8,
    ),
    'ImageDescription' =&gt; 'ptr',
    'Make' =&gt; 'HUAWEI',
    'Model' =&gt; 'STF-L09',
    'Orientation' =&gt; 0,
    'XResolution' =&gt; '72/1',
    'YResolution' =&gt; '72/1',
    'ResolutionUnit' =&gt; 2,
    'Software' =&gt; 'STF-L09C432B120',
    'DateTime' =&gt; '2018:11:24 15:11:58',
    'YCbCrPositioning' =&gt; 1,
  )
  </code></pre>
  
  <p>But when I run the exact same code on 7.1, I get much more EXIF data:</p>
  
  <pre><code>array (
    'FileName' =&gt; 'x.jpg',
    'FileDateTime' =&gt; 1543144462,
    'FileSize' =&gt; 3564506,
    'FileType' =&gt; 2,
    'MimeType' =&gt; 'image/jpeg',
    'SectionsFound' =&gt; 'ANY_TAG, IFD0, THUMBNAIL, EXIF, GPS, INTEROP',
    'COMPUTED' =&gt; 
    array (
      'html' =&gt; 'width="3968" height="2976"',
      'Height' =&gt; 2976,
      'Width' =&gt; 3968,
      'IsColor' =&gt; 1,
      'ByteOrderMotorola' =&gt; 1,
      'ApertureFNumber' =&gt; 'f/2.2',
      'Thumbnail.FileType' =&gt; 2,
      'Thumbnail.MimeType' =&gt; 'image/jpeg',
      'Thumbnail.Height' =&gt; 384,
      'Thumbnail.Width' =&gt; 512,
    ),
    'ImageWidth' =&gt; 3968,
    'ImageLength' =&gt; 2976,
    'BitsPerSample' =&gt; 
    array (
      0 =&gt; 8,
      1 =&gt; 8,
      2 =&gt; 8,
    ),
    'ImageDescription' =&gt; 'ptr',
    'Make' =&gt; 'HUAWEI',
    'Model' =&gt; 'STF-L09',
    'Orientation' =&gt; 0,
    'XResolution' =&gt; '72/1',
    'YResolution' =&gt; '72/1',
    'ResolutionUnit' =&gt; 2,
    'Software' =&gt; 'STF-L09C432B120',
    'DateTime' =&gt; '2018:11:24 15:11:58',
    'YCbCrPositioning' =&gt; 1,
    'Exif_IFD_Pointer' =&gt; 280,
    'GPS_IFD_Pointer' =&gt; 8454,
    'DeviceSettingDescription' =&gt; 'ipp' . "\0" . '',
    'THUMBNAIL' =&gt; 
    array (
      'ImageWidth' =&gt; 512,
      'ImageLength' =&gt; 384,
      'Compression' =&gt; 6,
      'Orientation' =&gt; 0,
      'XResolution' =&gt; '72/1',
      'YResolution' =&gt; '72/1',
      'ResolutionUnit' =&gt; 2,
      'JPEGInterchangeFormat' =&gt; 8802,
      'JPEGInterchangeFormatLength' =&gt; 31647,
    ),
    'DocumentName' =&gt; NULL,
    'ExposureTime' =&gt; '30000000/1000000000',
    'FNumber' =&gt; '220/100',
    'ExposureProgram' =&gt; 2,
    'ISOSpeedRatings' =&gt; 320,
    'ExifVersion' =&gt; '0210',
    'DateTimeOriginal' =&gt; '2018:11:24 15:11:58',
    'DateTimeDigitized' =&gt; '2018:11:24 15:11:58',
    'ComponentsConfiguration' =&gt; '' . "\0" . '',
    'ShutterSpeedValue' =&gt; '298973/10000',
    'ApertureValue' =&gt; '227/100',
    'BrightnessValue' =&gt; '0/1',
    'ExposureBiasValue' =&gt; '0/10',
    'MeteringMode' =&gt; 5,
    'LightSource' =&gt; 1,
    'Flash' =&gt; 0,
    'FocalLength' =&gt; '3950/1000',
    'MakerNote' =&gt; 'Auto',
    'SubSecTime' =&gt; '405238',
    'SubSecTimeOriginal' =&gt; '405238',
    'SubSecTimeDigitized' =&gt; '405238',
    'FlashPixVersion' =&gt; '0100',
    'ColorSpace' =&gt; 1,
    'ExifImageWidth' =&gt; 3968,
    'ExifImageLength' =&gt; 2976,
    'InteroperabilityOffset' =&gt; 8424,
    'SensingMethod' =&gt; 2,
    'FileSource' =&gt; '',
    'SceneType' =&gt; '',
    'CustomRendered' =&gt; 1,
    'ExposureMode' =&gt; 0,
    'WhiteBalance' =&gt; 0,
    'DigitalZoomRatio' =&gt; '100/100',
    'FocalLengthIn35mmFilm' =&gt; 27,
    'SceneCaptureType' =&gt; 0,
    'GainControl' =&gt; 0,
    'Contrast' =&gt; 0,
    'Saturation' =&gt; 0,
    'Sharpness' =&gt; 0,
    'SubjectDistanceRange' =&gt; 0,
    'GPSVersion' =&gt; '' . "\0" . '' . "\0" . '',
    'GPSLatitudeRef' =&gt; 'N',
    'GPSLatitude' =&gt; 
    array (
      0 =&gt; '51/1',
      1 =&gt; '8/1',
      2 =&gt; '49994201/1000000',
    ),
    'GPSLongitudeRef' =&gt; 'W',
    'GPSLongitude' =&gt; 
    array (
      0 =&gt; '2/1',
      1 =&gt; '42/1',
      2 =&gt; '59101467/1000000',
    ),
    'GPSAltitudeRef' =&gt; '' . "\0" . '',
    'GPSAltitude' =&gt; '7162/100',
    'GPSTimeStamp' =&gt; 
    array (
      0 =&gt; '15/1',
      1 =&gt; '11/1',
      2 =&gt; '58/1',
    ),
    'GPSProcessingMode' =&gt; 'GPS' . "\0" . '',
    'GPSDateStamp' =&gt; '2018:11:24',
    'InterOperabilityIndex' =&gt; 'R98',
    'InterOperabilityVersion' =&gt; '0100',
  )
  </code></pre>
  
  <p>Are there any modules or extensions or changes that I can make to get the full EXIF data when using 7.2?  I'm on a shared Linux host, so have some limitations on what I can do.</p>