From::_()
Creates a virtual method.
Table of Contents
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::HTML()
Encodes HTML special characters.
From::JSON()
Decodes JSON string to data.
From::URL()
Encodes URL special characters.
From::_()
Creates a virtual method.
From::__callStatic()
Calls the virtual method that has been created.
From::base64()
Decodes Base64 string.
From::entity()
Converts HTML entities to their corresponding characters.
From::query()
Converts URL query string to PHP array.
From::serial()
Unserializes data.