280 Commits

Author SHA1 Message Date
Mikhail Alferov 1ad4e2d550 setcookie.xml: add tags for the parameter and function names (#3517)
* setcookie.xml: add the `parameter` tag for the `value`

* setcookie.xml: add the `function` tag to the fn `setcookie`
2024-07-07 15:13:33 +01:00
Mikhail Alferov d4b1a88096 setcookie.xml: amend the argument type to bool (#3516)
In strict types mode: `Fatal error: Uncaught TypeError: setcookie(): Argument #6 ($secure) must be of type bool, int given`
2024-07-07 14:16:28 +01:00
Máté Kocsis db22a7cfcb Sync some methodsynopses with stubs (#3356)
Co-authored-by: Gina Peter Banyard <girgias@php.net>
2024-04-28 21:42:56 +01:00
Máté Kocsis d715365c09 Sync some methodsynopses with stubs (#3199)
Co-authored-by: Gina Peter Banyard <girgias@php.net>
2024-04-16 13:02:43 +02:00
haszi 61374bbe22 Change literal to constant tags 2024-04-16 10:45:49 +01:00
Gina Peter Banyard 5c1ccc6e24 [skip-revcheck] Whitespaces 2024-01-18 12:17:39 +00:00
Ben Morss cefe817294 Document approach to set cookie attributes not known to setcookie() (#3101)
* Modified setcookie() doc to mention that people could use header() to use additional parameters - and created a relevant example in header()

* Split lines so that none are longer than 80 characters.

* Removing the word "you", changing "parameter" to the more commonly used "attribute"

---------

Co-authored-by: Gina Peter Banyard <girgias@php.net>
2024-01-18 12:14:18 +00:00
KapitanOczywisty b4989f5c1f Add note to headers_sent() about empty filename (#2519) 2023-06-08 15:26:40 +01:00
Máté Kocsis f781803449 Narrow bool return types to true when possible (#2458) 2023-05-07 22:32:58 +02:00
Alessandro Maggi 40f49b91eb [skip-revcheck] Fix typo in long2ip (#2287) 2023-02-13 01:03:36 +00:00
Christoph M. Becker 6b053588fb Fix typo (header_list → headers_list) 2023-01-27 16:33:55 +01:00
Christoph M. Becker 5d6153f896 Fix GH-2049: setcookie() datetime format change in 8.2 is undocumented 2023-01-07 12:19:03 +01:00
Máté Kocsis c4ac6c0cfa Remove unnecessary procedural role (#1948) 2022-11-07 00:41:26 +00:00
Christoph M. Becker a64d62cdd7 Fix GH-1663: setcookie documentation recommends using mktime()
We improve the somewhat confusing mixing of time() and mktime(), and
also reword to avoid personalization.
2022-07-07 19:10:16 +02:00
Christoph M. Becker d829c7d11f Closes GH-1209: Named argument in setcookie function called $expires instead of $expires_or_options 2021-12-17 15:35:31 +01:00
Tor Edvardsson de14580fb3 Documentation for net_get_interfaces()
Co-authored-by: George Peter Banyard <girgias@php.net>
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>

Closes GH-847.
2021-12-15 17:33:34 +01:00
Christoph M. Becker 730cbb0a7a Fix GH-1192: setcookie() description is not updated
The exact date in the past may not matter too much, so we are
unspecific here.

And no, you can't set `$value` to false, because the parameter expects
a string.
2021-12-10 10:59:35 +01:00
Máté Kocsis 4e6f0774f0 Generate a few ext/standard method synopses from stubs (#1013) 2021-10-12 16:04:26 +02:00
hakre eecf090806 Improve headers_list() example (#1007)
Two & 1/2 things with the PHP example code:

1. `X-` prefix header names June 2012 [1], [2].

2. PHP prepends the `default_charset` [3] on any `text/*` media type in
   Content-Type header, unless the `charset` is with the `header()` call,
   like in the example.

3. PHP version 5.1.3 (May 2006) -> 8.0.11, the X-Powered-By header [4]
   removed (only distracting w/ the example).

PHP version in use to generate the output: 8.0.11.

[1]: https://datatracker.ietf.org/doc/html/rfc6648
[2]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers
[3]: https://www.php.net/manual/en/ini.core.php#ini.default-charset
[4]: https://www.php.net/manual/en/ini.core.php#ini.expose-php

Co-authored-by: Tiffany <tiffany.k.taylor@gmail.com>
2021-10-12 14:00:01 +01:00
Máté Kocsis 7f99d5e488 Remove some unnecessary methodsynopsis role attributes (#913) 2021-09-14 14:37:29 +02:00
Christoph M. Becker 7be2426e49 While DNS_A6 is available on Windows, it is not really supported
Cf. <https://github.com/php/php-src/blob/d3a6054d4441a6d431e6ca7aa63de62cee5585c2/ext/standard/dns_win32.c#L307>.
2021-08-30 17:09:07 +02:00
Christoph M. Becker f32912d04f Fix #73805: header() may not actually set header
We document that header() issues `E_WARNING` on failure, and link to
`headers_list()` which might be used to check success of `header()`.
2021-08-02 17:18:54 +02:00
Christoph M. Becker 590f93a2eb Remove obsolete info about IE 4 and 5.5 2021-08-02 17:07:23 +02:00
George Peter Banyard a6cb155475 Syslog does not support the %m format specificer
Nor any other printf specifier

Drop version name for Windows note as a drive by fix.

Closes GH-786.
2021-07-16 15:06:06 +02:00
Tyson Andre a3a4cd9bea Use a better example for using header() to set status code
This may be the first thing users see when searching how to set the
response code - most will not be familiar with differences between
http/1.0 and 1.1

- HTTP/1.0 does not support connection keepalive
- http_response_code(404) is a shorter way to set a status code with the default
  status message

https://www.php.net/manual/en/function.header.php#92305 also mentions
that the wrong protocol can cause issues with (older?) web servers

Closes GH-709.
2021-06-21 17:36:48 +02:00
Sergey Panteleev 3cbe1da561 Fix function name 2021-06-11 10:26:42 +03:00
Sergey Panteleev f33c301789 Fix issues in Network directory
Part of #658
2021-06-10 12:30:36 +03:00
Sergey Panteleev 184f3f7bd4 Remove PHP 5, 7 references (#565) 2021-05-12 14:49:16 +03:00
SvenRtbg 477c5f97a6 Document the changes to syslog.filter
* Documenting the changes to syslog.filter

https://github.com/php/php-src/pull/4265 restored the previous handling of multi-line log messages by adding `syslog.filter=raw`.

* Highlight the fact that line splitting is happening in all of the three original modes, but not in "raw".

* Add "raw" to syslog section of 7.3 migration guide

Closes GH-589.
2021-05-10 18:19:06 +02:00
Christoph M. Becker 1fb41f1900 define_syslog_variables() and related INI is removed as of PHP 5.4.0 2021-01-25 19:28:24 +01:00
George Peter Banyard 4a7ddddc27 Remove some mentions of register globals 2021-01-16 11:30:04 +00:00
Christoph Michael Becker 1d11e386eb Update dns_get_record() methodsynopsis
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@352215 c90b9560-bf6c-de11-be94-00142212c4b1
2020-12-27 18:46:35 +00: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
George Peter Banyard 37be0e0626 Mimic 'Alternative signature' prompt for setcookie in other functions which set cookies
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@352083 c90b9560-bf6c-de11-be94-00142212c4b1
2020-12-14 23:19:07 +00:00
Christoph Michael Becker 728b7a9bc0 Fix #80449: setcookie doc improvement
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@351968 c90b9560-bf6c-de11-be94-00142212c4b1
2020-12-09 12:17:23 +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 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 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 83f2f6fa3a Fix #80209: setcookie() is not fully RFC 6265 compliant
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@350831 c90b9560-bf6c-de11-be94-00142212c4b1
2020-10-09 14:35:13 +00:00
Christoph Michael Becker 8e3b1a6c1f Remove confusing reference to PHP 5
One can also use `setrawcookie()` with PHP 7 and 8; it just wasn't
available with PHP 4.

We also remove the now obsolete note that `httponly` is available as of
PHP 5.2.0.


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@350830 c90b9560-bf6c-de11-be94-00142212c4b1
2020-10-09 14:20:49 +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 53bdffa6b9 Removed some of the PHP5 changelogs
Patch contributed by Sobak <msobaczewski@gmail.com>.


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@350645 c90b9560-bf6c-de11-be94-00142212c4b1
2020-09-26 12:32:19 +00:00
George Peter Banyard 90b1edd9bc DNS_CAA is not supported on Windows
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@350550 c90b9560-bf6c-de11-be94-00142212c4b1
2020-09-12 16:49:44 +00:00
Karoly Negyesi 5f90c8ee0f warning is correct but it doesnt return null
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@350000 c90b9560-bf6c-de11-be94-00142212c4b1
2020-06-02 09:12:06 +00:00
Karoly Negyesi dc9b239186 document setcookie options keys
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@349997 c90b9560-bf6c-de11-be94-00142212c4b1
2020-06-01 22:21:53 +00:00