Commit graph

2469 commits

Author SHA1 Message Date
Yoshinari Takaoka
e2f53f0f60
deleted needless Also.
because previous section deleted by
7ee66cf9b5
2022-06-13 09:59:16 +09:00
George Peter Banyard
7ee66cf9b5 Nits to type juggling page
Add links
Remove implicit conversation to array note as this can never happen
2022-06-12 23:09:31 +01:00
Bart Vanhoutte
55956ac4e2
Switching fibers in destructors is not possible
Added a notice to document the fact that it's currently impossible to switch fibers in the destructor of an object cfr https://github.com/php/php-src/issues/8723.

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

Closes GH-1620.
2022-06-09 15:34:52 +02:00
George Peter Banyard
8de1190205
Rewrite type juggling page (#1542)
Describe all the different ways and contexts in which PHP can type juggle.

The only bit which is not described is how ``++`` and ``--`` behave as they have peculiar behaviour which is documented on the operator page already.
2022-06-06 14:12:31 +01:00
Christoph M. Becker
3d9dad29c7
Fix bug #67034: Unable to compare DateInterval instances with == operator
Closes GH-1590.
2022-05-23 11:31:55 +02:00
Christoph M. Becker
214335df7e
Fix Iterator example for PHP 8.1+
The newly introduced tentative return types require us to specify
return types for the method implementation.  Since `mixed` is only
available as of PHP 8.0.0, we use the `ReturnTypeWillChange` attribute
to suppress the deprecation for now.

This includes user note 127109 (well, at least the actionable part of
it).
2022-05-17 13:57:38 +02:00
Christoph M. Becker
cfaa7659da
Fix ArrayAccess::offsetExists() example for PHP 8.1+
The newly introduced tentative return types require us to specify
return types for the method implementation.  Since `mixed` is only
available as of PHP 8.0.0, we use the `ReturnTypeWillChange` attribute
to suppress the deprecation for now.

This includes user note 127108 (well, at least the relevant parts of
it).
2022-05-17 13:46:08 +02:00
Yoshinari Takaoka
8d18153861
fixed nullsafe operator link. 2022-05-16 23:26:58 +09:00
Dennis Birkholz
498bb30063
Mention nullsafe object operator in OOP changelog
Closes GH-1584.
2022-05-16 15:00:28 +02:00
Sergey Panteleev
081cf71ecb
[PHP 8.1] Return Type Compatibility with Internal Classes (#1560)
Co-authored-by: Máté Kocsis <kocsismate@woohoolabs.com>
Co-authored-by: Larry Garfield <larry@garfieldtech.com>
2022-05-10 20:19:06 +03:00
Sergey Panteleev
754641d8dd
[PHP 8.1] Document incompatible float to int implicit conversions (#1528)
Co-authored-by: Máté Kocsis <kocsismate@woohoolabs.com>
Co-authored-by: George Peter Banyard <girgias@php.net>
2022-04-28 11:57:41 +01:00
Sergey Panteleev
3e087a5c61
[PHP 8.1] Passing null to non-nullable parameters of built-in functions (#1555)
Closes #1554 

Co-authored-by: Máté Kocsis <kocsismate@woohoolabs.com>
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>
2022-04-28 12:22:42 +03:00
Sergey Panteleev
61cfd00858
[PHP 8.1] Usage of static Variables in Inherited Methods (#1549) 2022-04-27 15:49:21 +03:00
Sergey Panteleev
f646d66e39
Fix omitted colon
Fix #1527
2022-04-19 15:13:29 +03:00
Yoshinari Takaoka
c4363cbf39
fixed internal link url(nowdoc). 2022-04-12 20:23:01 +09:00
Larry Garfield
fca50d321c
Clean up autoload page (#1503) 2022-04-07 12:58:05 -05:00
Larry Garfield
c653d5a2b9
Comparison operator updates from comments (#1494) 2022-04-07 12:57:48 -05:00
George Peter Banyard
c44e9cb68b
Fix some (con|de)structor pages (#1507)
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>
2022-04-06 18:55:35 +01:00
Martin Samesch
87b5827062
Typos 2022-04-05 14:00:49 +02:00
David Grudl
14a60fad6e
Fixed info about @ operator (#1196)
- UPGRADING says that the error_reporting (ie. value returned by error_reporting() or ini_get('error_reporting ')) is changed, not the severity value passed to the handler.
- UPGRADING says that the error_reporting() == 0 should be replaced with !(error_reporting() & $err_no) in code, not the return with return false. So there is currenctly no way how to detect @ operator.
- "Prior to PHP 8.0.0, the value of the severity passed to the custom error handler was always 0" - no true
- "return false; // Silenced" - not true, if the function returns false then the normal error handler continues, so it is not "silenced".

(partially reverts "Cleanup and update docs related to @ operator" commit 12b1d4704ea448b55ec155619be1e50c0e67e9f9.)

Co-authored-by: George Peter Banyard <girgias@php.net>
Co-authored-by: Larry Garfield <larry@garfieldtech.com>
2022-04-04 20:28:18 +01:00
Sergey Panteleev
08498c3bd3
[PHP 8.1] Use named arguments after unpacking (#1329) 2022-03-30 15:35:44 -05:00
Sergey Panteleev
18b39f03ef
[PHP 8.1] New in initializers (#1327)
* [PHP 8.1] New in initializers
2022-03-30 15:13:41 -05:00
Rowan Tommins
0bafd5454e
Optional parameter changes in 8.1, and description improvements
* Document change in behaviour of misplaced optional parameters in 8.1
  (see https://github.com/php/php-src/commit/afc4d67c)
* Expand and update documentation of default/optional parameters
* Fix example labels to use correctly formatted entities
* Style improvements, and a couple of extra notes.

Closes GH-1191.
2022-02-18 13:24:09 +01:00
Mehrdad Moradi
2ef411d8ef
Grammer fix for paamayim-nekudotayim.xml docs
The word "parents" in "When an extending class overrides the parents definition of a method,
  PHP will not call the parent's method." needs to be changed to "parent's".

Closes GH-1389.
2022-02-09 09:56:10 +01:00
Thomas Landauer
170ca71e2d
Deleting usage "limitation" to debugging (#1331)
The name property is useful for more than just debugging.
2022-01-14 11:44:07 -06:00
Sergey Panteleev
afec339bc5
[PHP 8.1] Calling a static element on a trait is deprecated (#1333) 2022-01-14 16:11:24 +03:00
Sergey Panteleev
2dffa9fe11
[PHP 8.1] Calling a static element on a trait is deprecated (#1330) 2022-01-14 15:34:37 +03:00
Yoshinari Takaoka
f889672ad1
fixed property example which is outside a class. 2022-01-09 07:20:15 +09:00
Yoshinari Takaoka
df05c244a6
added readonly modifier link. 2022-01-09 07:17:46 +09:00
George Peter Banyard
f5e5b54129
Properties do not need to be declared with a visibility modifier (#1311)
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>
2022-01-08 18:58:14 +00:00
Yoshinari Takaoka
b57f8f256a
Clarify class-types meaning in composite type description. (#1306) 2022-01-06 14:22:32 +00:00
George Peter Banyard
7d9aa6352e
Restructure type declaration page & document Intersection types (#982) 2022-01-06 12:36:43 +00:00
Yoshinari Takaoka
5c2678e02f
added nullsafe operator link. 2021-12-28 18:41:09 +09:00
Yoshinari Takaoka
daaf426cbf
fixed CallableExpr(...) semantics description. 2021-12-28 18:17:54 +09:00
Yoshinari Takaoka
0b005cfe4e
[PHP 8.1] Document the first class callable syntax. (#1176)
Co-authored-by: Kamil Tekiela <tekiela246@gmail.com>
2021-12-28 15:51:30 +09:00
Yoshinari Takaoka
0e68f0a712
fixed Exception class and method property names. 2021-12-27 00:52:56 +09:00
Christoph M. Becker
bf4621b543
Actually add FiberError::__construct page to manual
For predefined classes, we need to do this manually.
2021-12-26 13:12:30 +01:00
Máté Kocsis
e5021b6d8b
Generate various class synopses from stubs - part 2 (#1251)
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>
2021-12-26 12:10:36 +01:00
Máté Kocsis
8b89ee4ec1
Regenerate Exception class and method synapses from stubs (#1260) 2021-12-26 12:05:49 +01:00
Máté Kocsis
c974636453
Change the order of union return types
In order to make it compatible with gen_stub.php's output
2021-12-26 10:57:26 +01:00
Máté Kocsis
1206279edf
Generate Zend class synopses from stubs - part 2 (#1245) 2021-12-23 14:25:27 +01:00
Máté Kocsis
65b648f058
Generate Zend class synopses from stubs - part 1 (#1244) 2021-12-23 14:03:03 +01:00
Thomas Landauer
1f7c271286
Document that enum cases are labels
Closes GH-1197.
2021-12-15 18:21:33 +01:00
Dan
c36ce0b514
[8.0] Document remaining core changes
* document changes to `new` in php 8.0

* document php 8.0 changes for `instanceof`

* document php 8.0 change to `define`

Co-authored-by: Peter Cowburn <petercowburn@gmail.com>

Closes GH-1155.
2021-12-14 18:34:40 +01:00
Christoph M. Becker
fbba47c54e
Remove obsolete info regarding php://stdin 2021-12-09 16:13:27 +01:00
Christoph M. Becker
0219f62dcd
*Declaring* mandatory after optional parameters is deprecated
It's not about *passing* of the arguments.
2021-12-09 13:53:23 +01:00
魔王卷子
690c3ea7c7
[skip-revcheck] fixed typo (#1187) 2021-12-09 10:12:38 +03:00
Yoshinari Takaoka
5e8652131e
added link for "final class constant" example.
This link will be also used from releases/8.1/en.php.
2021-12-05 22:47:41 +09:00
Yoshinari Takaoka
ca12a0c524
added link language.fibers in seealso section. 2021-12-04 20:56:31 +09:00
Yoshinari Takaoka
e0f02a3b23
Moved [overview|example] of Fibers to language/fibers.xml
Closes GH-1172.
2021-12-04 12:47:35 +01:00