Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP 8 #290

Open
6 of 44 tasks
i582 opened this issue Aug 9, 2021 · 0 comments
Open
6 of 44 tasks

PHP 8 #290

i582 opened this issue Aug 9, 2021 · 0 comments
Labels
PHP8 PHP8 feature

Comments

@i582
Copy link
Contributor

i582 commented Aug 9, 2021

PHP 8.x added a lot of different things and changed a lot of behaviors.
This issue is tracking the status of PHP 8 implementation in KPHP.

The following emoji will be used to denote the task status:

  • 🔆 — high priority
  • 🔅 — low priority
  • 🔸 — breaks backward compatibility
  • 🔺 — will not be changed in KPHP
  • ⏳ — syntax is supported at the parser level
  • 🔨 — in progress

PHP 8.0

Added

New syntax

Other

  • Stringable interface (RFC) 🔅
  • Ensure correct signatures of magic methods (RFC)
  • Add str_starts_with and str_ends_with (RFC) 🔅
  • Add str_contains (RFC) 🔅

Changed

  • Saner numeric strings (RFC) 🔸
  • Saner string to number comparisons (RFC) 🔸
  • Locale-independent float to string cast (RFC) 🔸
  • Sorting now stable (RFC) 🔸
  • Names in the namespace are treated as a single token (RFC)
  • Deferencable changes and arbitrary expressions in new/instanceof (RFC)
  • Access ::class on object (RFC) 🔅
  • Concatenation precedence (RFC) 🔸
  • Arrays starting with a negative index (RFC) 🔸

Removed

  • Remove (real) cast (without separate RFC) 🔺

  • Remove (unset) cast (without separate RFC) 🔺

  • Remove {} access (without separate RFC) 🔺

PHP 8.1

Added

New syntax

Other

  • array_is_list(array $array): bool (RFC)

Changed

  • New in initializers (RFC)
  • Array unpacking with string keys (RFC) 🔸
  • Static variables in inherited methods (RFC) 🔺

PHP 8.2

Added

New syntax

  • ⏳ Readonly classes (RFC) 🔨
  • ⏳ Disjunctive Normal Form Types (RFC) 🔨
  • Allow null and false as stand-alone types (RFC) | commit
  • ⏳ Add true type (RFC) 🔨
  • ⏳ Constants in Trait (RFC) 🔨

Other

  • Add flag FILTER_FLAG_GLOBAL_RANGE

Changed

  • Deprecate dynamic properties (RFC)
  • Deprecate ${} string interpolation (RFC)
  • DateTime::createFrom(Im|M)utable return type changed from DateTime to static
  • strtolower(), strtoupper(), stristr(), stripos(), strripos(), lcfirst(), ucfirst(), ucwords(), and str_ireplace() are no longer locale-sensitive
  • str_split() returns an empty array for an empty string now
  • Callables that are not accepted by the $callable() syntax (but are accepted by call_user_func()) are deprecated:
    • self::method
    • parent::method
    • "static::method"
    • ["self", "method"]
    • ["parent", "method"]
    • ["static", "method"]
    • ["Foo", "Bar::method"]
    • [new Foo, "Bar::method"]
@i582 i582 added the PHP8 PHP8 feature label Aug 9, 2021
@i582 i582 mentioned this issue Sep 22, 2021
6 tasks
quasilyte added a commit that referenced this issue Aug 9, 2022
This function works like `array<>::is_pseudo_vector`,
but also includes a fast path for arrays that are real vectors.

In the end, it behaves like php8 `array_is_list` function,
hence it has the same name.

Refs #290
quasilyte added a commit that referenced this issue Aug 9, 2022
This function works like `array<>::is_pseudo_vector`,
but also includes a fast path for arrays that are real vectors.

In the end, it behaves like php8 `array_is_list` function,
hence it has the same name.

Refs #290
quasilyte added a commit that referenced this issue Aug 11, 2022
This function works like `array<>::is_pseudo_vector`,
but also includes a fast path for arrays that are real vectors.

In the end, it behaves like php8 `array_is_list` function,
hence it has the same name.

Refs #290
quasilyte added a commit that referenced this issue Aug 11, 2022
This function works like `array<>::is_pseudo_vector`,
but also includes a fast path for arrays that are real vectors.

In the end, it behaves like php8 `array_is_list` function,
hence it has the same name.

Refs #290
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PHP8 PHP8 feature
Projects
None yet
Development

No branches or pull requests

1 participant