Christoph M. Becker
1c4b1d9f91
Fix GH-1157: Covarience/Contravarience with int/float doesn't work
2021-11-28 16:18:08 +01:00
iggyvolz
65782e9ec6
[PHP 8.1] Add note about implementing Serializable without __serialize ( #1141 )
...
* [PHP 8.1] Add note about implementing Serializable without __serialize
* fix
* Update serializable.xml
Co-authored-by: Sergey Panteleev <sergey@php.net>
2021-11-27 13:30:12 -06:00
Yoshinari Takaoka
d73c3dcbd6
[PHP 8.1] Document readonly properties. ( #1047 )
...
* [PHP 8.1] Document readonly properties.
* added ReflectionProperty::isReadOnly method.
* Apply suggestions from code review
Co-authored-by: Sergey Panteleev <sergey@php.net>
* Update language/oop5/properties.xml
Co-authored-by: Nikita Popov <nikita.ppv@googlemail.com>
* Update language/oop5/properties.xml
Co-authored-by: Nikita Popov <nikita.ppv@googlemail.com>
* added link to readonly-properties docs.
Co-authored-by: Sergey Panteleev <sergey@php.net>
Co-authored-by: Nikita Popov <nikita.ppv@googlemail.com>
2021-11-27 13:00:13 -06:00
Yoshinari Takaoka
c140370c35
Document autovivification from false deprecation. ( #1126 )
2021-11-27 01:38:00 +09:00
Fabien Villepinte
5f29513408
Generator is final
...
Closes GH-1145.
2021-11-25 17:28:03 +01:00
Agustin Gomes
9dd74f527d
Correct note to state behavior is still possible
...
The behavior in the Example #7 Old way to make arguments nullable
is still possible in PHP today.
For reference, I thought initially this was a bug in the PHP Core,
and tried to add the respective test case in the PR:
https://github.com/php/php-src/pull/7627
Closes GH-1142.
2021-11-24 18:38:06 +01:00
Yoshinari Takaoka
d75781abc8
Document returning by reference from a void function deprecation. ( #1127 )
...
Document returning by reference from a void function deprecation.
Co-authored-by: George Peter Banyard <girgias@php.net>
2021-11-24 11:48:43 +00:00
Yoshinari Takaoka
61b163dbdf
BackedEnum is also an interface. ( #1136 )
...
closes #1135
https://github.com/php/doc-en/issues/1135#issuecomment-977262147
2021-11-24 17:59:09 +09:00
Christoph M. Becker
0445efae74
Fix GH-1135: UnitEnum is an interface
2021-11-23 19:15:08 +01:00
Christoph M. Becker
59244d9ae9
Fix #81635 : No example of complex interpolation syntax with filenames
2021-11-18 15:18:17 +01:00
Christoph M. Becker
d332b5ae70
Uninitialized type properties are silently discarded on array cast
...
Cf. <https://bugs.php.net/81629 >.
2021-11-17 15:15:09 +01:00
Christoph M. Becker
3725fe1c95
Document dangling else handling
...
Cf. <https://bugs.php.net/51016#1619439579 >.
2021-11-16 16:10:56 +01:00
Christoph M. Becker
14e006b4ee
Passing values of wrong types is no longer undefined behavior as of PHP 8.1.0
...
Well, at least for the core functions, and many PECL extensions. Some
PECL extension functions may not yet behave this way, so we add in a
"supposed to".
2021-11-15 17:28:59 +01:00
Elnur Abdurrakhimov
3ba4c7d287
[skip-revcheck] Fix typo (it's → its)
...
Closes GH-1095.
2021-11-14 12:56:28 +01:00
cmp
085c38d45e
PHP 8.1: Update integer docs for new octal notation
...
Closes GH-1091.
2021-11-13 11:00:05 +01:00
Jeremy Mikola
7cfd68e5d4
Document Stringable::__toString() method
...
Also fixes links to __toString() magic method in Stringable interface docs.
Closes GH-1082.
2021-11-11 17:09:59 +01:00
DAI JIE
07fa5232bf
Correct the method name
...
Closes GH-1083.
2021-11-11 10:54:50 +01:00
Runbing
62739864aa
Correct the wrong keyword in the sample code ( #1080 )
...
functiond -> function
2021-11-10 10:56:29 +03:00
Yoshinari Takaoka
963efb2602
Clarify code comment about reference page, because readers does not know where to go in chunked html page.
...
"// See below." is valid only in Single HTML manual.
https://www.php.net/manual/en/language.enumerations.methods.php
2021-10-31 22:58:32 +09:00
Yoshinari Takaoka
0305a7128f
added BackedEnum interface link.
2021-10-31 20:28:12 +09:00
Yoshinari Takaoka
90f5f73e9b
tweaked example code comments, [method|interface] links.
2021-10-31 14:53:32 +09:00
André L F S Bacci
be039c085e
[skip-revcheck] Fix output spacing.
2021-10-29 11:20:24 -03:00
Larry Garfield
9fe8103520
Document enumerations
...
Co-authored-by: Yoshinari Takaoka <mumumu@mumumu.org>
Co-authored-by: Sergey Panteleev <sergey@php.net>
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>
Closes GH-960.
2021-10-29 01:14:57 +02:00
Gert de Pagter
78d273c6d4
Add a very basic match example ( #1028 )
2021-10-19 10:35:03 +01:00
Danack
b95e76e41d
Types are not hints in PHP. ( #1003 )
...
As they are checked at run-time, type checking is enforced in PHP and not 'hinted'.
Co-authored-by: Kamil Tekiela <tekiela246@gmail.com>
2021-10-09 14:43:01 +01:00
Craig Francis
eff487cfb3
Use 'ENT_QUOTES|ENT_SUBSTITUTE' for HTML encoding and decoding functions ( #361 )
2021-09-23 14:00:33 +01:00
George Peter Banyard
975e9114e8
Add documentation about the never type ( #889 )
2021-09-23 13:59:21 +01:00
Kim Hallberg
9bdf88f157
Fix attribute example titles ( #952 )
...
Closes #951
2021-09-17 20:33:38 +01:00
garretm
fd6629b1ac
Remove duplicate "Superglobals"
...
In the site it looked like "Superglobals — Superglobals are built-in variables that are always available in all scopes"
https://www.php.net/manual/en/language.variables.superglobals.php
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>
Closes GH-924.
2021-09-14 15:22:15 +02:00
Máté Kocsis
35b57d9df0
Remove some unnecessary abstract modifier from methodsynopses ( #914 )
2021-09-14 12:43:32 +01:00
Milan Davídek
5a8b53edab
Fixed synopsis of IteratorAggregate
...
IteratorAggregate is an inteface, not a class
Closes GH-946.
2021-09-13 17:30:34 +02:00
Christoph M. Becker
871fdba56f
Fix 71082: Order of use clause and return type declaration unspecified
2021-09-13 17:20:48 +02:00
Peter Cowburn
1bfd6a1d79
WS - remove trailing whitespace
...
[skip-revcheck]
2021-09-09 22:19:52 +01:00
Peter Cowburn
36571044a0
changelog for typeerror -> argumentcounterror in PHP 7.1.0
2021-09-09 22:19:51 +01:00
Barney Laurance
900b6a65c0
Add typed properties reference to TypeError page ( #936 )
2021-09-09 22:18:23 +01:00
Christoph M. Becker
d8d0b3cdf8
Close #880 : Obsolete default value for protocol_version
2021-09-03 18:35:53 +02:00
Jorg Sowa
346c0bd13f
Updated examples of casting to boolean
...
Updated examples of casting to boolean adding one case that is pretty common appearing in code string `"0"`.
Closes GH-890.
2021-08-29 16:27:06 +02:00
Christoph M. Becker
06126805f4
Fix #72656 : Object destructor called before constructor
...
We just need to document PHP's eager evaluation strategy; the rest is
already documented.
2021-08-27 13:12:20 +02:00
Christoph M. Becker
3926279f82
Fix #76311 : __construct/__destruct must not have return types
2021-08-27 13:03:42 +02:00
Gabriel Millian
9a72097c8b
[WS] Indent breaks in switch examples ( #882 )
...
Co-authored-by: Sergey Zorin <zors1@php.net>
2021-08-26 21:49:55 +01:00
Christoph M. Becker
28ad235028
Fix #879 : array_fill() example has wrong parameter names
2021-08-25 16:32:58 +02:00
Yoshinari Takaoka
17297101a4
updated strict_typing link.
2021-08-21 10:15:21 +09:00
brycesharpookla
6b09bb638a
Update basic-syntax.xml to fix typo
...
Fixes typo in the note about not using short tags
2021-08-19 20:21:59 +02:00
Christoph M. Becker
ebb0c383f4
http:// stream wrappers do not necessarily HTTP/1.0 GET
...
Cf. <https://bugs.php.net/bug.php?id=67352 >.
2021-08-19 15:48:14 +02:00
AlexandrErohin
5aff4add61
Proposal - more concrete explanation of the fail for __set_state ( #489 )
...
* explained the fail more concrete for __set_state
* Update language/oop5/magic.xml
Co-authored-by: Anna Filina <afilina@gmail.com>
* Improve language around __set_state not implemented
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>
Co-authored-by: Anna Filina <afilina@gmail.com>
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>
2021-08-17 16:39:24 -04:00
Kamil Tekiela
de9c65c91f
Remove E_STRICT and other PHP 5 related information ( #730 )
2021-08-17 17:56:25 +01:00
Marco Aurélio Deleu
1499a2369c
[80538] Shorthand syntax for array destruction ( #477 )
...
* Shorthand syntax for array destruction
* Remove reference to PHP 7.0 or lower
* Bring back mention of list() prior to 7.1.0
* Replace array destruction with destructuring
Co-authored-by: Kamil Tekiela <tekiela246@gmail.com>
Co-authored-by: Anna Filina <afilina@gmail.com>
Co-authored-by: Kamil Tekiela <tekiela246@gmail.com>
2021-08-17 12:10:06 -04:00
Azeem Hassni
ef1ae5d45f
Fix typo in example function call
...
Looks like the example function name and the function call do not match, if it's an oversight this commit fixes it.
Closes GH-852.
2021-08-15 13:46:39 +02:00
Yoshinari Takaoka
a8796e2f71
fixed unset cast removed warning as of PHP 8.0.0.
2021-08-12 22:31:24 +09:00
Peter Cowburn
2e8ef0a1bd
hyphenate "object-oriented"
...
refs #846
2021-08-08 18:48:47 +01:00