Commit graph

26845 commits

Author SHA1 Message Date
Kamil Tekiela
4f006f632a Clean up all mysqli aliases removed in PHP 5.4
Closes GH-499.
2021-03-23 13:58:40 +01:00
Kamil Tekiela
9c9b8f3e66 Improve mysqli_query docs
* Add a nice big SQL injection warning

* Break overlong breaks

* Rewrite result_mode explanation

* Simplify examples

* Add mysqli_prepare to see also

Closes GH-497.
2021-03-23 13:53:28 +01:00
Kamil Tekiela
df1072f8d2 Improve mysqli_real_escape_string docs
* Tidy up the alias situation
  It should look the same as https://www.php.net/manual/en/function.mysqli-set-opt.php

* Add "produce" word

Copied from MySQL manual

* Removed old note

  This was changed some time back around PHP 7.3. In PHP 8 all of these warnings have been converted to Errors and the function doesn't return NULL or FALSE anymore.

* Revert Doc Bug #55757

  I'm sorry, but this note doesn't belong here. It is absolutely useless to point it out in this particular place. People migrating from mysql_* API have to do a lot more work than ensuring their escaping function works. This might have been added as a comment, but it should not be part of the official doc page.

* Provide more reasonable example

* Remove mysqli_character_set_name from See also

Closes GH-498.
2021-03-23 13:35:16 +01:00
Cees-Jan Kiewiet
5f6b54fb57 Add FPM access.format placeholders
Closes GH-115.
2021-03-23 13:01:52 +01:00
Kensuke Morii
51ac3ba130 Fix runkit7 functions arg type
runkit7_function_redefine(): Fix type of $is_strict.

runkit7_constant_redefine(): Fix type of $newVisibility.

Closes GH-501.
2021-03-22 18:34:05 +01:00
Kamil Tekiela
34ec8e992f Simplify mysqli select db examples
Closes GH-496.
2021-03-22 17:01:43 +01:00
Gabriel Millian
4bf7d10a44 Fix errors in the comments of example number 6
Closes GH-500.
2021-03-22 16:44:17 +01:00
Dharman
fa95dcaee8 Shorten comments to fit in 1 line 2021-03-20 13:44:18 +00:00
Christoph M. Becker
c4de1a0604 Revert "Show info about PHP error reporting"
This reverts commit f3e5da139a, because
it was accidentally committed.

Cf. <https://github.com/php/doc-en/pull/465>.
2021-03-19 01:54:04 +01:00
Christoph M. Becker
dde64312eb PHP 7.0 was silent about pseudo-numeric string juggling 2021-03-19 01:28:04 +01:00
kestutisv
f3e5da139a Show info about PHP error reporting
Reader needs to be informed about PHP errors.
2021-03-19 01:09:29 +01: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
Máté Kocsis
7e5d0d1bb6 Generate mysqli methodsynopses based on stubs
Cf. <https://github.com/php/doc-en/pull/301>.
2021-03-18 23:21:37 +01:00
Eric Stern
661e99fa9d Correct Closure::bindTo failure return value
Closes GH-492.
2021-03-18 21:51:46 +01:00
Sara Golemon
6a89105fdc
Annotate return types for Throwable/Exception/Error as possibly returning null 2021-03-18 14:42:35 +00:00
Christoph M. Becker
2b6afe9652 Clarify that encoding conversion may be done by the driver 2021-03-18 14:30:28 +01:00
George Peter Banyard
2f00a6fcf4
Actually document bool return for imageinterlace() 2021-03-17 16:33:47 +00:00
Christoph M. Becker
34316e9ecf Fix signatures of some GD functions wrt. PHP 8.0
Regarding the return type of `imageinterlace()`, see
<c17434429d>.
2021-03-17 15:56:11 +01:00
Sara Golemon
c352a8f0a7
Clarify types and meaning of interlact param to imageinterlace() 2021-03-17 13:24:40 +00:00
Christoph M. Becker
7962c3e6a2 Fix #80652: Leading whitespace in a regex is ignored 2021-03-16 17:37:54 +01:00
Calvin Buckley
52c463b1d9 Fix #77477: Document hard_timeout
I've encountered issues relating to the hard timeout, so having
this explained for myself in a few months time and others will be
handy.

ML post where hard_timeout was established (not linked in docs, but
may be useful):

http://php-news.ctrl-f5.net/message/php.internals/92559

Closes GH-491.
2021-03-16 17:31:45 +01:00
Calvin Buckley
530ceda342 Document ssh2_send_eof
Closes GH-490.
2021-03-16 17:27:15 +01:00
Christoph M. Becker
161f444538 Fix #76203: roundCorners method no longer exists 2021-03-16 14:33:38 +01:00
Christoph M. Becker
3b792d800d Fix #72189: Missing CURL_VERSION_HTTP2 from constants list 2021-03-15 19:13:06 +01:00
sy-records
f2da597f73 Update Swoole ini
Closes GH-486.
2021-03-15 12:13:48 +01:00
George Peter Banyard
fc26164b4b
Hot fix for comment of last line 2021-03-11 13:51:06 +00:00
George Peter Banyard
68c0fcdb9e
Add example of a float string as an array key
The behaviour is different from a float key

Also reorder to put this example closer to the numeric keys
Use single quotes consistently

Closes GH-487
2021-03-11 13:49:51 +00:00
Alex Erohin
1075568da5 Fix Ticks usage example
Clarify where tick events are generated, and delete the "equivalent
behavior" example which calls tick_handler() manually, because that
example isn't really suitable.

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

Closes GH-464.
2021-03-11 14:18:10 +01:00
Yoshinari Takaoka
eea9c73ba4 fixed example some more, added to previous commit. 2021-03-11 21:53:51 +09:00
Yoshinari Takaoka
16eda7d3c3 fixed example, print argument is wrong somehow. 2021-03-11 21:49:39 +09:00
Rowan Tommins
ede9d209f6 Clarify the syntax and role of arguments for echo and print
- Rather than implying that parentheses are optional, make clear
  that they are never part of the syntax for these keywords.
- Don't spend so many examples on different types of string.
- Do include examples of non-string arguments.
- Add a note with additional examples of how parentheses interact.
- Don't refer to either construct as "function-like", instead use
  the term "expression" consistently.
- Additional tidying to make the pages more consistent with each
  other.
- Add "print" to the list of language constructs which are
  documented as functions.
- Remove mention of what PHP versions below 5.4 did with short
  echo tags.
2021-03-10 14:37:20 +01:00
Larry Garfield
77a77dbd29 Note that all visibilities of trait abstract methods are supported now
Closes GH-476.
2021-03-10 14:14:18 +01:00
Clemente
c461c1fc7f Add union type to streamWrapper::stream_stat
Closes GH-485.
2021-03-10 14:09:50 +01:00
Dharman
0a4dd74391 Updating mysqli prepared statements docs
Co-authored-by: George Peter Banyard <7906688+Girgias@users.noreply.github.com>

Closes GH-338.
2021-03-08 18:56:40 +01:00
Riikka Kalliomäki
67268fc268 Update index_key handling in array_column for php8
Closes GH-460.
2021-03-08 18:32:22 +01:00
Dharman
d59f3c6684 Improve MySQLi Quick Start guide
Co-authored-by: Anna Filina <afilina@gmail.com>

Closes GH-184.
2021-03-08 18:28:58 +01:00
Dharman
a3a310ccc2 Remove try-catch from PDO examples
Also fix erroneous indentation.

Co-authored-by: Anna Filina <afilina@gmail.com>

Closes GH-323.
2021-03-08 17:03:42 +01:00
Christoph M. Becker
80958298c0 Fix wording in example
The evaluation order is irrelevant; what matters is the associativity.

This amends commit bcd666c7d0.
2021-03-08 16:19:09 +01:00
Michael Voříšek
bcd666c7d0 Fix ternary precedence
We also fix the misleading note about the ternary operator's
associativity.

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

Closes GH-470.
2021-03-08 16:11:18 +01:00
Kunal Mehta
5145d40353 Update for LuaSandbox 4.0.0
Copies changes made in <https://gerrit.wikimedia.org/g/mediawiki/php/luasandbox>:
* Drop support for PHP 5 & HHVM, add PHP 8 support
* Remove stretch-backports instructions (no longer functional)

Closes GH-471.
2021-03-08 11:25:24 +01:00
fullbl
793c9fc579 SimpleXMLElement::attributes() may return NULL
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>

Closes GH-482.
2021-03-08 11:22:03 +01:00
Yoshinari Takaoka
8e7cce7b98 fixed Static resolution operator (::) link, point to paamayim-nekudotayim page. 2021-03-05 23:21:40 +09:00
Yoshinari Takaoka
33e300f8f0 added missing UnhandledMatchError version info. 2021-03-05 22:17:32 +09:00
George Peter Banyard
9ee9eccf45 Refactor OO section part 2
Some misses from the first time

Signed-off-by: Larry Garfield <larry@garfieldtech.com>

Closes GH-329
2021-03-04 17:06:22 -06:00
Yoshinari Takaoka
f09e04a352 We can use debug_zval_dump function in PHP 8, too.
$ php --version
PHP 8.0.3 (cli) (built: Mar  3 2021 02:12:40) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.3, Copyright (c) Zend Technologies
    with Zend OPcache v8.0.3, Copyright (c), by Zend Technologies
    with Xdebug v3.0.2, Copyright (c) 2002-2021, by Derick Rethans
$ php -r "\$var=[1,2,3,4]; debug_zval_dump(\$var);"
array(4) refcount(4){
  [0]=>
  int(1)
  [1]=>
  int(2)
  [2]=>
  int(3)
  [3]=>
  int(4)
}
2021-03-05 01:02:18 +09:00
Rowan Tommins
d08d2e887f Rewrite debug_zval_dump manual based on current (>=7.0) behaviour
- The recommended use of a call-time pass-by-reference has been
  impossible since PHP 5.4, making the examples unusable.
- The re-design of references in PHP 7.0 means that the refcount
  no longer reflects these.

Closes GH-466.
2021-03-03 15:34:17 +01:00
Christoph M. Becker
95bc76b545 Fix #74479: usleep with large numbers 2021-03-03 14:40:16 +01:00
Christoph M. Becker
d7dbb4196a iconv_mime_decode_headers() doesn't treat headers case-insensitively
Cf. <https://bugs.php.net/40462>.
2021-03-03 14:34:53 +01:00
Christoph M. Becker
7c6c83d08e Document opcache.cache_id for IIS app pools
Cf. <https://bugs.php.net/80812>.
2021-03-02 12:44:37 +01:00
Marko Kaznovac
537b504c17
add ob_implicit_flush.flag-param change log for php 8.0
Closes GH-462

Signed-off-by: George Peter Banyard <girgias@php.net>
2021-02-26 03:26:46 +00:00