xref: /PHP-8.2/ext/exif/tests/exif004.phpt (revision c2ca9cd7)
1--TEST--
2Check for exif_read_data, Unicode WinXP tags
3--EXTENSIONS--
4mbstring
5exif
6--SKIPIF--
7<?php
8    if (!defined("EXIF_USE_MBSTRING") || !EXIF_USE_MBSTRING) die ('skip mbstring loaded by dl');
9?>
10--INI--
11output_handler=
12zlib.output_compression=0
13exif.decode_unicode_intel=UCS-2LE
14exif.decode_unicode_motorola=UCS-2BE
15exif.encode_unicode=ISO-8859-1
16--FILE--
17<?php
18/*
19  test4.jpg is a 1*1 image that contains Exif tags written by WindowsXP
20*/
21$image  = exif_read_data(__DIR__.'/test4.jpg','',true,false);
22var_dump($image['WINXP']);
23?>
24--EXPECT--
25array(5) {
26  ["Subject"]=>
27  string(10) "Subject..."
28  ["Keywords"]=>
29  string(11) "Keywords..."
30  ["Author"]=>
31  string(9) "Rui Carmo"
32  ["Comments"]=>
33  string(29) "Comments
34Line2
35Line3
36Line4"
37  ["Title"]=>
38  string(8) "Title..."
39}
40