From::_()

Creates a virtual method.

Table of Contents
  1. Description
  2. Example

Description

From::_(...$lot): mixed;

This method adds a new static method dynamically so that it can be used later as if it were a native method.

Example

// This register will make method `From::RGB()` available for use
From::_('RGB', static function (int $r, int $g, int $b): string {
    return sprintf('#%02x%02x%02x', $r, $g, $b);
});

From::_()

Creates a virtual method.

From::entity()

Converts HTML entities to their corresponding characters.