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>
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.
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.
- 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.
In current PHP versions the Exception-class seems to allow all Throwable
values for its constructor's $previous param instead of only values of
type Exception.
Closes GH-442.
It is pretty confusing to only have a section about "Magic constants"
with the xmlid `language.constants.predefined` but to start that
section with a paragraph about predefined constants.
This was apparently added in response to a bug report against PHP
5.2 [https://bugs.php.net/bug.php?id=40775]. Testing suggests the
limitation was removed at least as long ago as 5.6, and probably
earlier.
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>
Closes-GH444.
It's the value of the called object.
Additionally, in php 7.1, it was no longer possible to reassign $this
indirectly through a reference.
Even in php 7.0, I'd think it would initially be more like a value
(that references can be created from) than
a reference, but I may be misunderstanding what this means or what $this
did in php 5 or older.
Closes GH-380.
The formal grammar for numeric strings included integers, and
floating-point numbers (decimals) with a mandatory exponent, but not
decimal numbers without exponent.
Closes GH-368