Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
PHP
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==== Standard library changes and additions ==== * Weak maps were added in PHP 8. A {{code|WeakMap}} holds references to objects, but these references do not prevent such objects from being [[Garbage collection (computer science)|garbage collected]].<ref name="wiki.php.net-3" /> This can provide performance improvements in scenarios where data is being [[Cache (computing)|cached]]; this is of particular relevance for [[object–relational mapping]]s (ORM).<ref name="Brent" /> * Various adjustments to interfaces, such as adding support for creating {{code|DateTime}} objects from interfaces, and the addition of a {{code|Stringable}} interface that can be used for type hinting.<ref name="Brent" /> * Various new functions including {{code|lang=php|str_contains()}}, {{code|lang=php|str_starts_with()}}, and {{code|lang=php|str_ends_with()}};<ref name="Merchant-2020">{{cite web |last1=Merchant |first1=Amit |title=These new string functions are coming in PHP 8 |url=https://www.amitmerchant.com/new-string-functions-php8/ |website=Amit Merchant |date=13 June 2020 |access-date=4 October 2020}}</ref> {{code|lang=php|fdiv()}}; {{code|lang=php|get_debug_type()}}; and {{code|lang=php|get_resource_id()}}<ref name="Brent" /> * Object implementation of {{code|lang=php|token_get_all()}}<ref name="Brent" />
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)