Skip to content

Implement generic method syntax#48

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

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

Conversation

@thekid

@thekid thekid commented Oct 1, 2023

Copy link
Copy Markdown
Member
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

1 participant