php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #21460 Online manual doc issue
Submitted: 2003-01-06 06:08 UTC Modified: 2003-01-06 17:43 UTC
From: php at pgregg dot com Assigned:
Status: Closed Package: Documentation problem
PHP Version: 4.3.0 OS: n/a
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: php at pgregg dot com
New email:
PHP Version: OS:

 

 [2003-01-06 06:08 UTC] php at pgregg dot com
In function.file-get-contents.php it says "Identical to readfile(), except that file_get_contents() returns the file in a string."   which is wrong... (or misleading at best)...

readfile() immediately outputs the file and the return value from the function is success or failure.

file_get_contents() does not behave like this at all.

I would suggest that the document reads:
"Identical to file(), except that file_get_contents() returns the file in a string."

Since the return values from both functions are the contents of the file, just in different formats (array vs string).

Paul, aka Qube@#php

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-01-06 17:43 UTC] nicos@php.net
This bug has been fixed. Please wait a little the documentation's update.

Thank you for your report.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 03 15:01:34 2025 UTC