Commit graph

2379 commits

Author SHA1 Message Date
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
Yoshinari Takaoka
2513f792fc
Document Flexible heredoc/nowdoc. (#829)
Document Flexible heredoc/nowdoc.

Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>
2021-08-09 00:39:46 +09:00
Kamil Tekiela
a8b8d435a7
The fallback for undefined constants is removed as of PHP 8 (#795) 2021-08-06 14:00:39 +01:00
othercorey
9e9e3c019b
Remove abstract modifier from ArrayAccess methods (#838) 2021-08-05 10:22:42 +02:00
Máté Kocsis
ab57ab6849
Mark a few interfaces as oointerface rather than ooclass (#818) 2021-07-30 17:01:16 +02:00
Yoshinari Takaoka
526b0a2fee
added union type link. 2021-07-29 02:00:36 +09:00
Christoph M. Becker
9b0d4b4438
Remove obsolete info about $HTTP_RAW_POST_DATA and always_populate_raw_post_data 2021-07-20 13:48:00 +02:00
othercorey
79e4c610f9
Fix list of types included in mixed
Closes GH-783.
2021-07-20 10:47:41 +02:00
Christoph M. Becker
7718f6613c
Fix typo in Stringable example
Closes GH-754.
2021-07-03 12:02:31 +02:00
zors1
ea8796a6c3
Fix case of a keyword in match.xml (#736) 2021-06-26 17:42:36 +01:00
Sergey Panteleev
dc99afbc1f
Wrap use with literal tag 2021-06-25 13:49:36 +03:00
Amritpal Nagra
5a945dfef0
fix link from predefined to magic constants
Closes GH-706.
2021-06-21 10:41:19 +02:00
Yoshinari Takaoka
5b4d6ddc1a
Fix some issues in predefined directory
Part of #658
2021-06-13 12:58:10 +09:00
Barney Laurance
14cd35a23d
Exception implements Throwable + fix message param type
We were getting an Error trying to pass null to construct an exception, and found that "" works but null doesn't.

Also correcting the inheritance keyword since Throwable is an interface.

This brings these docs more into line with the PHPStorm stubs.

Closes GH-668.
2021-06-07 19:06:00 +02:00
Yoshinari Takaoka
dcbd255b07
fixed match expression example comment. 2021-06-05 04:30:28 +09:00
Yoshinari Takaoka
969080b592
Added ReflectionAttribute related Documentation. (#588)
* Added ReflectionAttribute related Documentation.

* Update reference/reflection/reflectionattribute/isrepeated.xml

Co-authored-by: Benjamin Eberlei <kontakt@beberlei.de>

* Update reference/reflection/reflectionattribute/isrepeated.xml

Co-authored-by: Benjamin Eberlei <kontakt@beberlei.de>

* Update reference/reflection/reflectionattribute/newinstance.xml

Co-authored-by: Benjamin Eberlei <kontakt@beberlei.de>

* Update reference/reflection/reflectionattribute/newinstance.xml

Co-authored-by: Benjamin Eberlei <kontakt@beberlei.de>

* Update reference/reflection/reflectionclass/getattributes.xml

Co-authored-by: Benjamin Eberlei <kontakt@beberlei.de>

* Update reference/reflection/reflectionclassconstant/getattributes.xml

Co-authored-by: Benjamin Eberlei <kontakt@beberlei.de>

* Update reference/reflection/reflectionfunctionabstract/getattributes.xml

Co-authored-by: Benjamin Eberlei <kontakt@beberlei.de>

* Update reference/reflection/reflectionparameter/getattributes.xml

Co-authored-by: Benjamin Eberlei <kontakt@beberlei.de>

* Update reference/reflection/reflectionproperty/getattributes.xml

Co-authored-by: Benjamin Eberlei <kontakt@beberlei.de>

Co-authored-by: Benjamin Eberlei <kontakt@beberlei.de>
2021-06-04 20:20:42 +09:00
Christoph M. Becker
e4b889a3e8
Fix #53397: Modulo is not accurate with double 2021-05-28 16:10:48 +02:00
Christoph M. Becker
cc0198aafd
Fix typo in example 2021-05-26 12:03:49 +02:00
George Peter Banyard
1fc853737a
Remove legacy MongoDb driver docs 2021-05-25 19:38:28 +01:00
Máté
c44475e1fa
Generate methodsynopses based on stubs for Zend functions and methods
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>

Closes GH-168.
2021-05-22 16:48:16 +02:00
AlexandrErohin
c945294038
Added Static Properties example for Traits (#488) 2021-05-21 21:09:16 +03:00
Dat Hoang
88f6725933
Add outputs to show differences between PHP 8 and previous versions (#602) 2021-05-21 21:06:26 +03:00
Yoshinari Takaoka
c045b64078
added named arguments link. 2021-05-13 11:33:06 +09:00
Larry Garfield
6b509ccf78
Fold comments into interfaces page
Co-authored-by: Kamil Tekiela <tekiela246@gmail.com>

Closes GH-594.
2021-05-12 16:52:12 +02:00
George Peter Banyard
5ccee0ae1c Move iterable variance section to OOP section 2021-05-04 18:25:23 +01:00
Yoshinari Takaoka
7bdd9249f2 added WeakReference "PHP 8" version info.
https://github.com/php/php-src/blob/PHP-8.0/Zend/zend_weakrefs_arginfo.h#L38-L40
2021-05-02 08:45:46 +09:00
Guilliam Xavier
d0a31e8605
Fix missing space between public and getPrevious in Exception class synopsis (#552) 2021-04-27 18:24:56 +02:00
Dan Brown
35af8187d0
Updated string & array curly brace access with support notice (#546)
The documentation still states that array/string curly brace access
is possible but this was deprecated as of PHP 7.4 as per this RFC:
https://wiki.php.net/rfc/deprecate_curly_braces_array_access
and no longer supported as of PHP 8.
2021-04-26 13:24:09 +02:00
Sebastian Hädrich
a4ee22721e
Wouldn't it be more readable if we had a list? (#542)
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>
2021-04-22 16:11:14 +02:00
Kamil Tekiela
16a1bdfd1c
Remove double words (#540) 2021-04-20 12:54:54 +02:00
AllenJB
1fb0ef23d7
Fix #80942: Object iteration / Iterator: Replace duplicated examples with direct links
* Object iteration / Iterator: Replace duplicated examples with direct links to the appropriate sections and add cross-links.

Closes GH-517.
2021-04-20 11:28:39 +02:00
Larry Garfield
bf28a4ce4f
Describe WeakMaps (#479)
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>
2021-04-13 23:59:11 +02:00
Kim Hallberg
c07214dc9c
Fix attributes overview example emitting E_WARNING (#522)
Fix `targetDirectoryExists` method in example emits E_WARNING if `$targetDirectory` already exists.

Reference:
- https://www.php.net/manual/en/function.mkdir.php

Co-authored-by: Kamil Tekiela <tekiela246@gmail.com>
2021-04-13 18:57:58 +02:00
Larry Garfield
68a416eeb7
Remove old weakref extension (#514)
* Remove old weakref extension that no longer works and namespace conflicts with WeakMap in PHP 8.
2021-04-12 15:35:52 +02:00
Guilliam Xavier
011596bcff
Fix/update operators.precedence (#509)
- explain why associativity is not applicable to unary operators
- distinguish between unary and binary `+`/`-`
- add some missing reference links
- update the precedence of string concatenation for PHP 8
- fix "(n/a)" ("not applicable") to "non-associative" for ternary

References:
- https://github.com/php/php-src/blob/master/Zend/zend_ast.c
  (search "Operator Precedence")
- https://github.com/php/php-src/blob/master/Zend/zend_language_parser.y
  (search "precedence")
  (NOTE: in opposite order)
2021-04-12 14:37:34 +02:00