ConversionUtils

The most common conversion utilities to change the data from a simple type to another one.

To convert complex classes or structures, use SerializationUtils class.

package

Default

Methods

Decode a string from base64 (Which contains only numbers, uppercase, lowercase, forward slash, plus and equal signs)

base64ToString(string $string): string
static

Arguments

$string

string

a base64 string

Response

string

The base64 decoded as its original string

Encode a string to base64 (Which contains only numbers, uppercase, lowercase, forward slash, plus and equal signs)

stringToBase64(string $string): string
static

Arguments

$string

string

The input string to be converted

Response

string

The input string as base 64