Skip to content

Operator / Syntax (Symbols) Search #1761

Description

@AllenJB

Affected page

N/A (Search box)

Current issue

Users may come across operators (and other syntax symbols) in code they don't know, and/or don't know what the name for an operator is. This can make them very hard to find documentation for.

Suggested improvement

Add operators (and other non-word syntax) to the search feature.

For best results I think partial matches should work. eg:

  • ? would match ternary, ?:, ?? and ??=
  • : would match ternary, ?: and (static) class access
  • [ would match arrays and list
  • '.' would match concatenation, splat and spread

(I may have missed other potential matches from these examples - this is just "off the top of my head")

Additional context

Related issues:

Recently seen chat query:

[, $target] = explode('://', $uri, 2); I encountered this line in some code, searching online is tricky with this kind of thing, what is this syntax called?

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions