Skip to content

[PHP 8.5] Add array_first(), array_last() and other news coming up 🥳  #9265

Description

@TomasVotruba

Ref https://amitmerchant.com/everything-that-is-coming-in-php-85/

Done

Todo

* [ ] Final property promotion

see reasoning PR:


  • Add pipe operator
Image

Activity

  1. self-assigned this
    on Jul 16, 2025
  2. changed the title [-][PHP 8.5] Add array_first(), array_last() and other news coming up[/-] [+][PHP 8.5] Add array_first(), array_last() and other news coming up 🥳 [/+] on Jul 16, 2025
  3. TomasVotruba commented on Jul 16, 2025

    @TomasVotruba
    MemberAuthor

    Great! Keep it open for the rest of features

  4. samsonasik commented on Aug 20, 2025

    @samsonasik
    Member

    PHP 8.5 deprecate semicolon in switch case, see https://3v4l.org/SHboE/rfc#vgit.master

    see https://wiki.php.net/rfc/deprecations_php_8_5#languagesyntax_deprecations

    $a = 'A';
    switch ($a) {
    -    case 'A';
    +    case 'A':
            echo 'test';
    }
  5. samsonasik commented on Sep 8, 2025

    @samsonasik
    Member

    Downgrade rule first for final property promotion is at PR:

  6. arshidkv12 commented on Sep 8, 2025

    @arshidkv12

    So we need a FinalPropertyPromotionRector, right?

    public function __construct(
    -   /** @final */
    -   public string $id
    +   final public string $id
    ){}
  7. samsonasik commented on Sep 8, 2025

    @samsonasik
    Member

    Yes, but seems need to be optional, since it means parameter can't be override by child. So, can't be part of php85.php set, user that want it need to apply manually.

  8. arshidkv12 commented on Sep 8, 2025

    @arshidkv12

    Ok

  9. samsonasik commented on Oct 8, 2025

    @samsonasik
    Member
  10. TomasVotruba commented on Oct 13, 2025

    @TomasVotruba
    MemberAuthor

    Closing as most of these are implemented and pipe has opened PR.
    For next PHP 8.5 features, simply open a PR 👍

  11. github-actions commented on Mar 15, 2026

    @github-actions
    Contributor

    This issue has been automatically locked because it has been closed for 150 days. Please open a new issue if you have a similar problem.

  12. locked as resolved and limited conversation to collaborators on Mar 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions