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