1--TEST-- 2Bug #50845 (exif_read_data() returns corrupted exif headers) 3--EXTENSIONS-- 4exif 5--FILE-- 6<?php 7$infile = __DIR__.'/bug50845.jpg'; 8var_dump(exif_read_data($infile)); 9?> 10--EXPECTF-- 11array(44) { 12 ["FileName"]=> 13 string(12) "bug50845.jpg" 14 ["FileDateTime"]=> 15 int(%d) 16 ["FileSize"]=> 17 int(803603) 18 ["FileType"]=> 19 int(2) 20 ["MimeType"]=> 21 string(10) "image/jpeg" 22 ["SectionsFound"]=> 23 string(30) "ANY_TAG, IFD0, THUMBNAIL, EXIF" 24 ["COMPUTED"]=> 25 array(9) { 26 ["html"]=> 27 string(26) "width="5472" height="3648"" 28 ["Height"]=> 29 int(3648) 30 ["Width"]=> 31 int(5472) 32 ["IsColor"]=> 33 int(1) 34 ["ByteOrderMotorola"]=> 35 int(0) 36 ["ApertureFNumber"]=> 37 string(5) "f/7.1" 38 ["Copyright"]=> 39 string(13) "Public Domain" 40 ["Thumbnail.FileType"]=> 41 int(2) 42 ["Thumbnail.MimeType"]=> 43 string(10) "image/jpeg" 44 } 45 ["ImageDescription"]=> 46 string(295) "A U.S. Marine Corps MV-22 Osprey lands on the USS Whidbey Island (LSD-41), May 5, 2016. The vehicles were loaded to support a theater security cooperation event as a part of a MEU readiness exercise. (U.S. Marine Corps photo by Lance Cpl. Koby I. Saunders/22 Marine Expeditionary Unit/ Released)" 47 ["Make"]=> 48 string(5) "Canon" 49 ["Model"]=> 50 string(22) "Canon EOS-1D X Mark II" 51 ["Orientation"]=> 52 int(1) 53 ["XResolution"]=> 54 string(5) "240/1" 55 ["YResolution"]=> 56 string(5) "240/1" 57 ["ResolutionUnit"]=> 58 int(2) 59 ["Artist"]=> 60 string(24) "Lance Cpl. Koby Saunders" 61 ["Copyright"]=> 62 string(13) "Public Domain" 63 ["Exif_IFD_Pointer"]=> 64 int(12572) 65 ["THUMBNAIL"]=> 66 array(6) { 67 ["Compression"]=> 68 int(6) 69 ["XResolution"]=> 70 string(5) "240/1" 71 ["YResolution"]=> 72 string(5) "240/1" 73 ["ResolutionUnit"]=> 74 int(2) 75 ["JPEGInterchangeFormat"]=> 76 int(860) 77 ["JPEGInterchangeFormatLength"]=> 78 int(11204) 79 } 80 ["ExposureTime"]=> 81 string(5) "1/200" 82 ["FNumber"]=> 83 string(5) "71/10" 84 ["ExposureProgram"]=> 85 int(1) 86 ["ISOSpeedRatings"]=> 87 int(100) 88 ["UndefinedTag:0x8830"]=> 89 int(2) 90 ["UndefinedTag:0x8832"]=> 91 int(100) 92 ["ExifVersion"]=> 93 string(4) "0230" 94 ["ShutterSpeedValue"]=> 95 string(15) "7643856/1000000" 96 ["ApertureValue"]=> 97 string(15) "5655638/1000000" 98 ["ExposureBiasValue"]=> 99 string(3) "0/1" 100 ["MaxApertureValue"]=> 101 string(3) "4/1" 102 ["MeteringMode"]=> 103 int(5) 104 ["Flash"]=> 105 int(16) 106 ["FocalLength"]=> 107 string(4) "24/1" 108 ["ColorSpace"]=> 109 int(65535) 110 ["FocalPlaneXResolution"]=> 111 string(12) "5472000/1438" 112 ["FocalPlaneYResolution"]=> 113 string(11) "3648000/958" 114 ["FocalPlaneResolutionUnit"]=> 115 int(2) 116 ["CustomRendered"]=> 117 int(0) 118 ["ExposureMode"]=> 119 int(1) 120 ["WhiteBalance"]=> 121 int(0) 122 ["SceneCaptureType"]=> 123 int(0) 124 ["UndefinedTag:0xA431"]=> 125 string(12) "002099000358" 126 ["UndefinedTag:0xA432"]=> 127 array(4) { 128 [0]=> 129 string(4) "24/1" 130 [1]=> 131 string(5) "105/1" 132 [2]=> 133 string(3) "0/0" 134 [3]=> 135 string(3) "0/0" 136 } 137 ["UndefinedTag:0xA434"]=> 138 string(22) "EF24-105mm f/4L IS USM" 139 ["UndefinedTag:0xA435"]=> 140 string(10) "000044bc4c" 141} 142