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
codedokode
2f79a80776
Fix list of falsy values ( #519 )
...
There is no integer -0 (minus zero)
2021-04-12 13:55:35 +02:00
Rowan Tommins
fe18943c11
Fix half-deleted sentence about "new" and reference assignment ( #520 )
...
This had a stray ")", and was left with a misleading half-sentence
about "new" returning a reference, which it doesn't.
2021-04-12 13:28:11 +02:00
Tom Sullivan
165718f97f
Remove errant ,
( #516 )
2021-04-08 11:55:42 +02:00
Juliette
4a21d28c5b
Language Ref/Traits: fix incorrect information about abstract methods ( #510 )
...
As of PHP 8.0, `abstract private` methods are allowed in `trait`s. `abstract public` method were previously already supported.
Co-authored-by: jrfnl <jrfnl@users.noreply.github.com>
2021-04-05 18:43:19 +02:00
Yoshinari Takaoka
b694d83ae9
added Stringable version info.
2021-04-02 17:10:06 +09:00
Larry Garfield
069ce7647c
Document Stringable interface
2021-04-01 23:26:42 +02:00
Larry Garfield
3ddc88b836
Note changes in how private methods inherit. ( #481 )
2021-04-01 23:21:32 +02:00
Christoph M. Becker
e49940b757
Fix #73938 : PHP7 foreach internal array pointer
2021-03-31 16:09:52 +02:00
rochdiNassah
c630570335
Fix Typo
...
Closes GH-503.
2021-03-25 18:30:31 +01:00
Mike Lehan
175b731219
Clarify that Exception::getPrevious may return a Throwable
...
Spotted this when using PhpStorm's documentation which incorrectly typehints an Exception - use of this as Exception could cause a TypeError if a non-Exception Throwable is returned.
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>
Closes GH-463.
2021-03-23 14:07:21 +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
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
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
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
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
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