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