Commit graph

876 commits

Author SHA1 Message Date
Sergey Panteleev
dcd6496472
Fix: mode => permissions 2021-05-24 10:03:45 +03:00
Sergey Panteleev
6240e8ba3b
Added parameter tag to permissions and directory 2021-05-24 09:55:03 +03:00
Karsten Lehmann
0867f488b5
Fix parameter names for rmdir function (#615) 2021-05-22 12:00:44 +01:00
Karsten Lehmann
4ac2306796
Fix parameter names for mkdir function
Closes GH-614.
2021-05-22 12:24:31 +02:00
Yoshinari Takaoka
16c0995798
followed parameter fix in the previous commit.
ref: c1a31a1a3d
2021-05-19 02:54:28 +09:00
Alexander Schranz
c1a31a1a3d
Fix fputcsv for php 8 to separator
Closes GH-607.
2021-05-18 14:00:44 +02:00
Sergey Panteleev
6a7a96ccc6
file_get_contents length parameter (#590)
* Rename maxlen parameter to length
2021-05-07 17:00:24 +03:00
Sergey Panteleev
f9c4a68ef4
Removed references to PHP 5, PHP 7.0 (#548) 2021-04-26 11:46:55 +03:00
Sergey Panteleev
a0ae28d3bc
Removed references to PHP 5, PHP 7.0 (#545) 2021-04-24 20:01:17 +03:00
Sergey Panteleev
aab33d6443
Removed references to PHP 5, PHP 7.0 (#544) 2021-04-23 11:35:26 +03:00
Sergey Panteleev
5fabd07880
Removed Changelog entries for PHP 5, PHP 7.0 (#543) 2021-04-22 17:52:58 +03:00
Rowan Tommins
4138897b12
Remove or rewrite examples using implode("", file(...)) (#523)
This is a weirdly inefficient way of getting a file's content into
a string, and I'm not sure why anyone would think it was a good
idea.
2021-04-12 22:33:56 +02:00
Eric Stern
397f37e930 Match fgetcsv parameter names to values in reflection
The documented parameters differ from the names exposed in reflection/source code. Now that named parameters are supported in PHP 8, this discrepancy is confusing and impactful.

```
 $ php --rf fgetcsv
Function [ <internal:standard> function fgetcsv ] {

  - Parameters [5] {
    Parameter #0 [ <required> $stream ]
    Parameter #1 [ <optional> ?int $length = null ]
    Parameter #2 [ <optional> string $separator = "," ]
    Parameter #3 [ <optional> string $enclosure = "\"" ]
    Parameter #4 [ <optional> string $escape = "\\" ]
  }
  - Return [ array|false ]
}
```

Closes GH-493.
2021-03-19 00:56:00 +01:00
Christoph M. Becker
88c1f8d6c9 Fix/clarify dirname/basename docs wrt. locales
For basename(), we declare the behavior regarding invalid characters in
the path as being undefined, since that depends on the availability of
mblen, and also on the position of the invalid characters prior to PHP
8.0.0[1].

dirname() is actually not local-aware, but relies on an ASCII
compatible character encoding regarding the directory separator.  On
Windows, it is however, dependent on the currently set codepage
(although a fallback is still in place to use the Windows ANSI codepage
of the operating system[2], if the string is not valid for the current
codepage).

Again, we declared failure to comply to these assumptions as resulting
in undefined behavior.  Users should make sure to pass valid strings.

[1] <http://git.php.net/?p=php-src.git;a=commitdiff;h=90705d44e3da1d0aa7b8b4fd921ec597391eccb2>
[2] <5e01542526/win32/codepage.h (L95-L106)>
2021-02-19 15:12:33 +01:00
Tyson Andre
8b7fb1d4ac Improvements to stat() - document other file types
Document character device and sockets

Link to SplFileInfo.
Unlike stat(), SplFileInfo throws instead of emitting a notice,
which is convenient for avoiding the error handler.
(file_exists() returns files that exist but are unreadable)

Related to GH-319

Closes GH-322.
2021-02-15 16:37:42 +01:00
Yoshinari Takaoka
cb3e68d99d changed warning about deleted functions as of PHP 8.0.0. 2021-02-10 03:44:01 +09:00
Tomáš Fejfar
359f21684b fgets() can return false
As described in the docs "If there is no more data to read in the file
pointer, then false is returned."

Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>

Closes GH-425.
2021-01-28 12:41:51 +01:00
Christoph M. Becker
ef88bff8ae file_get_contents() raises warning for directories
Closes GH-46.
2021-01-22 14:43:22 +01:00
Yoshinari Takaoka
3a6f3a0b84 Added PHP 8 into versions.xml for filesystem based on stubs.
Closes GH-344.
2021-01-17 14:25:42 +01:00
Tyson Andre
b4d9a0a908 Link to SplFileInfo from is_file()/file_exists() docs
And update the list of values that can be returned by getType based on
php 8.0 ext/standard/filestat.c

SplFileInfo is the only way to do some things, such as

1. Check for the existence of a file that may or may not be readable
   without emitting a notice
   that is caught by whatever error handler the project uses.

   (e.g. file_exists can return false for unix sockets)
2. Check for file types such as unix sockets
   (e.g. `$info->getType() === 'socket'`)

Recently, I was looking for how to check if a given path was a unix
socket and the filesystem functions didn't have any links to that
information.

Closes GH-319.
2021-01-10 13:37:52 +01:00
Christoph Michael Becker
0c9c2dd669 Generate some standard methodsynopses based on stubs
Cf. <https://github.com/php/doc-en/pull/289>.


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@352191 c90b9560-bf6c-de11-be94-00142212c4b1
2020-12-26 19:26:31 +00:00
Christoph Michael Becker
e41806c30b Revert revision(s) 351724 from phpdoc/en/trunk:
Document false and null return types

Cf. <https://news-web.php.net/php.doc.cvs/17645>.


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@351730 c90b9560-bf6c-de11-be94-00142212c4b1
2020-11-28 18:05:44 +00:00
Christoph Michael Becker
4754397753 Revert revision 351727 from phpdoc/en/trunk:
Document false and null return types

Cf. <https://news-web.php.net/php.doc.cvs/17645>.


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@351729 c90b9560-bf6c-de11-be94-00142212c4b1
2020-11-28 17:58:32 +00:00
Jakub Vrana
69bd53265b Document false and null return types
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@351727 c90b9560-bf6c-de11-be94-00142212c4b1
2020-11-28 15:12:46 +00:00
Jakub Vrana
c80da7c04a Document false and null return types
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@351724 c90b9560-bf6c-de11-be94-00142212c4b1
2020-11-28 12:54:59 +00:00
Christoph Michael Becker
cfa78d6bb9 Fix #72738: realpath() expands junction points
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@351451 c90b9560-bf6c-de11-be94-00142212c4b1
2020-11-19 13:28:19 +00:00
George Peter Banyard
a9a6224ca9 Split type declarations into their dedicated page
Remove obsolete OOP5 TypeHinting page
Document union types

Closes GH-174

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@351365 c90b9560-bf6c-de11-be94-00142212c4b1
2020-11-12 18:39:19 +00:00
Christoph Michael Becker
97750f17b2 Fix #75024: glob(): Non-portable GLOB_BRACE presented without warning
A caution or even a warning appear to be too strong for this, but moving
the note to the parameter section seems to be in order according to
<http://svn.php.net/viewvc/phpdoc/doc-base/trunk/RFC/skeletons/function.xml?view=markup#l128>.


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@351342 c90b9560-bf6c-de11-be94-00142212c4b1
2020-11-09 17:44:11 +00:00
Christoph Michael Becker
ccb1313e0c Fix #71075: Update rename() docs to mention Windows-specific permissions issues
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@351270 c90b9560-bf6c-de11-be94-00142212c4b1
2020-11-05 15:49:38 +00:00
Christoph Michael Becker
46a0d3708e Fix #80300: add "unlink" in "see also" section
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@351181 c90b9560-bf6c-de11-be94-00142212c4b1
2020-11-03 09:59:25 +00:00
Christoph Michael Becker
b820701969 Remove obsolete info regarding Vista/2008
Windows Vista/2008 is required as of PHP 5.5.0 anyway; no need to mention
that requirement here.


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@351180 c90b9560-bf6c-de11-be94-00142212c4b1
2020-11-03 09:54:24 +00:00
Christoph Michael Becker
b95d28e6ec Fix return types
Functions which return false on failure should state that in their
signature as well.


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@351135 c90b9560-bf6c-de11-be94-00142212c4b1
2020-11-02 15:52:35 +00:00
Christoph Michael Becker
86e6094e86 Use canonical type names
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@351133 c90b9560-bf6c-de11-be94-00142212c4b1
2020-11-02 15:39:04 +00:00
Christoph Michael Becker
9e0f03ac35 Proper variadics instead of pseudo variadics
We markup variadic parameters with the `rep=repeat` standard DocBook
attribute of `<methodparam>`, and use proper variable names instead of
using the old pseudo variable name `...`.


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@351129 c90b9560-bf6c-de11-be94-00142212c4b1
2020-11-02 11:17:26 +00:00
Yoshinari Takaoka
5222a1c1ed fixed typo
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@351023 c90b9560-bf6c-de11-be94-00142212c4b1
2020-10-28 01:11:46 +00:00
Christoph Michael Becker
1017932869 Fix #80282: cannot send binary data to popen
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@351021 c90b9560-bf6c-de11-be94-00142212c4b1
2020-10-27 22:43:26 +00:00
Christoph Michael Becker
dec1f8445a Remove safe_mode related information
Sorry, translators, for breaking your builds again.


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@350871 c90b9560-bf6c-de11-be94-00142212c4b1
2020-10-13 22:07:26 +00:00
Christoph Michael Becker
513913468b parse_ini_file comment cleanup
* Explain limited value interpolation of reserved characters.
* Clarify that a constant value only works for the whole value.
* Clarify path evaluation of the file.
* Note magic constants are not interpolated.
* Add security note.

Patch contributed by Larry Garfield <larry@garfieldtech.com>.


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@350855 c90b9560-bf6c-de11-be94-00142212c4b1
2020-10-12 21:57:55 +00:00
Christoph Michael Becker
e443388d42 Remove info about SAPIs which are removed as of PHP 7.0.0
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@350661 c90b9560-bf6c-de11-be94-00142212c4b1
2020-09-26 16:56:25 +00:00
Christoph Michael Becker
7f569e1f17 Remove more changelog entries, mostly from PHP 5.3 era
Patch contributed by Sobak <msobaczewski@gmail.com>.


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@350655 c90b9560-bf6c-de11-be94-00142212c4b1
2020-09-26 14:08:59 +00:00
Christoph Michael Becker
9af43469f4 Remove more changelog entries, mostly from PHP 5.2 era
Patch contributed by Sobak <msobaczewski@gmail.com>.


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@350654 c90b9560-bf6c-de11-be94-00142212c4b1
2020-09-26 13:52:31 +00:00
Christoph Michael Becker
be5b0f33a1 Remove more changelog entries, mostly from PHP 5.1 era
Patch contributed by Sobak <msobaczewski@gmail.com>.


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@350653 c90b9560-bf6c-de11-be94-00142212c4b1
2020-09-26 13:45:57 +00:00
Christoph Michael Becker
1a6fa40ded GLOB_MARK adds a *back*slash on Windows
This integrates user note 125311.


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@350427 c90b9560-bf6c-de11-be94-00142212c4b1
2020-08-31 10:37:28 +00:00
Christoph Michael Becker
5236d760ce Fix #79993: SplFileObject::flock has LOCK_NB as a valid operation
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@350338 c90b9560-bf6c-de11-be94-00142212c4b1
2020-08-18 23:26:40 +00:00
Christoph Michael Becker
fe81a24d2e Fix #78400: Sym-linked files are not accessible
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@350194 c90b9560-bf6c-de11-be94-00142212c4b1
2020-07-22 09:24:50 +00:00
Christoph Michael Becker
70ee71ffb4 Update inode info regarding Windows
We also fix the markup, and an erroneous info about the device number.

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@350157 c90b9560-bf6c-de11-be94-00142212c4b1
2020-07-15 11:43:25 +00:00
Christoph Michael Becker
72bc373e47 Document dev element of stat() array on Windows
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@350100 c90b9560-bf6c-de11-be94-00142212c4b1
2020-07-03 08:30:39 +00:00
Christoph Michael Becker
3b325dcb9a Document different behavior of readlink() on Windows
Cf. <https://github.com/php/php-src/pull/3825#issuecomment-467837181>.

While we're at it, we also fix the order of the "returnvalues" and "changelog" sections.


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@350097 c90b9560-bf6c-de11-be94-00142212c4b1
2020-07-02 13:25:03 +00:00
Christoph Michael Becker
047e515775 Clarify meaning of negative default_socket_timeout
Cf. <https://github.com/php/php-src/pull/5693>

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@350020 c90b9560-bf6c-de11-be94-00142212c4b1
2020-06-09 17:13:21 +00:00
Christoph Michael Becker
0536573944 Updates regarding text/binary mode
On Windows, 'b' is the default as of PHP 5.0.0.


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@350008 c90b9560-bf6c-de11-be94-00142212c4b1
2020-06-04 10:35:17 +00:00