Skip to content
New issue

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

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

Already on GitHub? # to your account

PHP 8.0 language support tracking issue #765

Open
25 of 36 tasks
jakubmisek opened this issue Jun 3, 2020 · 0 comments
Open
25 of 36 tasks

PHP 8.0 language support tracking issue #765

jakubmisek opened this issue Jun 3, 2020 · 0 comments

Comments

@jakubmisek
Copy link
Member

jakubmisek commented Jun 3, 2020

Configuration:

  • <LangVersion> allows to set 8.0, latest refers to 8.0, default 7.4

Language features:

  • Union types
    • syntax, mixed
    • type analysis, "null", nullability
    • runtime type check
  • Attributes
    • new syntax
    • resolve CLR attributes as before
    • store metadata
    • PHP reflection
  • Constructor properties (0ea8da8, c8f10e8)
  • static return type
  • match expression (https://wiki.php.net/rfc/match_expression_v2)
  • Nullsafe operator with short-circuit evaluation (https://wiki.php.net/rfc/nullsafe_operator)
  • Named arguments (https://wiki.php.net/rfc/named_params)
    • call_user_func*() and internal PhpRoutine.Invoke(Context, PhpArray) to support named arguments
    • use in ReflectionAttribute::newInstance() accordingly
    • Variadic functions and argument unpacking
    • error when calling a virtual method that changes the parameter name of its parent
  • mixed type
  • Throw expression
  • Allowing ::class on objects
  • Non-capturing catches
  • Trailing comma in parameter lists
  • Stringable interface (32d72d4)

Functions:

see for latest release status https://docs.peachpie.io/compatibility-status/

  • WeakMap
  • Attribute
  • str_contains, str_starts_with, str_ends_with
  • fdiv, get_resource_id
  • get_debug_type
  • preg_last_error_msg
  • PhpToken
  • resource to Object migration (CurlHandle, CurlMultiHandle, CurlShareHandle, GdImage, Socket, AddressInfo, openssl, XMLWriter, XMLParser)

Others:

  • Calling non-static class methods statically result in a fatal error
  • strict magic method signature
  • Locale-independent float to string casting (invariant, we can ignore current context finally!)
@jakubmisek jakubmisek self-assigned this Jun 3, 2020
jakubmisek added a commit that referenced this issue Jun 16, 2020
jakubmisek added a commit that referenced this issue Jun 16, 2020
jakubmisek added a commit that referenced this issue Jun 16, 2020
jakubmisek added a commit that referenced this issue Jun 16, 2020
jakubmisek added a commit that referenced this issue Jun 16, 2020
jakubmisek added a commit that referenced this issue Jun 18, 2020
jakubmisek added a commit that referenced this issue Jun 21, 2020
jakubmisek added a commit that referenced this issue Aug 26, 2020
jakubmisek added a commit that referenced this issue Aug 26, 2020
needs the synthesized variable to be bound correctly (so it won't be visible and properly allocated on stack)
ref #765
jakubmisek added a commit that referenced this issue Sep 5, 2020
jakubmisek added a commit that referenced this issue Nov 27, 2020
jakubmisek added a commit that referenced this issue Nov 30, 2020
@jakubmisek jakubmisek mentioned this issue Nov 30, 2020
11 tasks
jakubmisek added a commit that referenced this issue Dec 1, 2020
jakubmisek added a commit that referenced this issue Dec 3, 2020
jakubmisek added a commit that referenced this issue Dec 9, 2020
jakubmisek added a commit that referenced this issue Dec 9, 2020
jakubmisek added a commit that referenced this issue Feb 18, 2021
@jakubmisek jakubmisek changed the title PHP 8 language support tracking issue PHP 8.0 language support tracking issue May 14, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

1 participant