Skip to content

Core functionality in() #1

@thekid

Description

@thekid

Scope of Change

Introduce core functionality in() which searches for elements in a
collection.

Rationale

The PHP functions array_search and in_array have ugly names and a
confusing parameter order.

Functionality

Definition:

<?php
  bool in (array list, mixed element) 
?>

Example:

<?php
  if (in (array(1, 2, 3), 1)) {
    // ...
  }
?>

Dependencies

None.

Related documents

n/a

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