xref: /PHP-8.2/ext/fileinfo/tests/bug69107.phpt (revision bd9f4fa6)
1--TEST--
2Bug #69107 (finfo no longer detects PHP files)
3--EXTENSIONS--
4fileinfo
5--FILE--
6<?php
7$finfo = new finfo(FILEINFO_MIME_TYPE);
8
9var_dump($finfo->buffer("<?php\nclass A{}"));
10var_dump($finfo->buffer("<?php class A{}"));
11var_dump($finfo->buffer("<?php\tclass A{}"));
12var_dump($finfo->buffer("<?php\n\rclass A{}"));
13?>
14--EXPECT--
15string(10) "text/x-php"
16string(10) "text/x-php"
17string(10) "text/x-php"
18string(10) "text/x-php"
19