php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #49591 Fileinfo example code uses wrong constant
Submitted: 2009-09-18 15:15 UTC Modified: 2009-09-22 09:39 UTC
From: mike at silverorange dot com Assigned: vrana (profile)
Status: Not a bug Package: Documentation problem
PHP Version: Irrelevant OS: Irrelevant
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: mike at silverorange dot com
New email:
PHP Version: OS:

 

 [2009-09-18 15:15 UTC] mike at silverorange dot com
Description:
------------
On this page http://php.net/manual/en/function.finfo-file.php the example uses the wrong constant.

The constant is FILEINFO_MIME, not FILEINFO_MIME_TYPE.




Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-09-20 18:12 UTC] kalle@php.net
Theres a difference between FILEINFO_MIME and FILEINFO_MIME_TYPE:

* FILEINFO_MIME returns the mimetype
* FILEINFO_MIME_TYPE returns the type and mime encoding as per RFC 2045

I think its intended usage of FILEINFO_MIME_TYPE, but I'll assign it to the original author of the example to clarify this.
 [2009-09-22 09:39 UTC] vrana@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

Kalle is right.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 03 13:01:33 2025 UTC