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 7 #869

Open
24 of 35 tasks
Tsygankov-Slava opened this issue Jul 15, 2023 · 0 comments
Open
24 of 35 tasks

PHP 7 #869

Tsygankov-Slava opened this issue Jul 15, 2023 · 0 comments
Labels
PHP7 PHP7 feature

Comments

@Tsygankov-Slava
Copy link

Tsygankov-Slava commented Jul 15, 2023

PHP 7.x added a lot of different things and changed a lot of behaviors.
This issue is tracking the status of PHP 7 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 7

Added

New syntax

  • Null Coalesce Operator (RFC)
  • Combined Comparison (Spaceship) Operator $a <=> $b (RFC)
  • Group Use Declarations use name\space\{A, B, C as c} (RFC)
  • New types of function/method parameters int, float, bool (RFC)
  • Types of function/method return int, float, bool, array (RFC)
  • Anonymous Classes $class = new class{} (RFC) | πŸ”¨ Add support for anonymous classesΒ #273
  • ⏳ Generator Return Expressions yield ... return 99 (RFC) | πŸ”¨
  • ⏳ Generator Delegation yield from func() (RFC) | πŸ”¨

Other

  • Array in define define( 'FOO', [1,2] ) (RFC)

Changed

  • Fix "foreach" behavior (RFC)

PHP 7.1

Added

New syntax

  • Nullable type ?int (RFC)
  • Return type void (RFC)
  • Square bracket syntax for array destructuring assignment ['key'=>$var] = ['key'=>'Π—Π½Π°Ρ‡Π΅Π½ΠΈΠ΅'] (RFC)
  • Key support in list() list( 'id'=>$id ) = $data (RFC)
  • ⏳ New pseudo-type iterable (RFC) | πŸ”¨
  • Generalize support of negative string offsets$string[-1] (RFC)
  • ⏳ Catching Multiple Exception Types catch (First | Second $e) (RFC) | πŸ”¨

Other

  • New static Closure method Closure::fromCallable() (RFC)
  • Scope of constants in classes private const (RFC)

PHP 7.2

Added

New syntax

  • Trailing Commas In List Syntax (RFC)

PHP 7.3

Added

New syntax

  • ⏳ Links in list list( &$a ) (RFC) | πŸ”¨

Other

  • is_countable() (RFC)
  • array_(key|value)_(first|last)() (RFC && RFC)

Changed

  • Flexible Heredoc and Nowdoc Syntaxes (RFC)

PHP 7.4

Added

New syntax

  • Spread Operator in Array Expression [ ...$arr ] (RFC)
  • Null Coalescing Assignment Operator ??= (RFC)
  • Numeric Literal Separator 299_792 (RFC)

Other

  • Covariant Returns and Contravariant Parameters (RFC)
  • strip_tags( $str, ['a', 'p'] ) (RFC)
  • __serialize() __unserialize() (RFC && RFC)
  • Call array_merge without arguments array_merge() (RFC)
  • Allow throwing exceptions from __toString() (RFC)
  • Weak References (RFC)

Changed

  • Typed Properties 2.0 public int $id (RFC)
  • Arrow Functions 2.0 fn( $x ) => $x (RFC)
@Tsygankov-Slava Tsygankov-Slava added the PHP7 PHP7 feature label Jul 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PHP7 PHP7 feature
Projects
None yet
Development

No branches or pull requests

1 participant