Skip to content

Implement generic method syntax#48

Open
thekid wants to merge 1 commit intomasterfrom
feature/generic-methods
Open

Implement generic method syntax#48
thekid wants to merge 1 commit intomasterfrom
feature/generic-methods

Conversation

@thekid
Copy link
Member

@thekid thekid commented Oct 1, 2023

class Arrays {

  public static function reversed<T>(array<T> $elements) {
    // TBI
  }
}

$reversed= Arrays::reversed<string>(['A', 'B', 'C']);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant