PHP dispose de nombreuses fonctions permettant de manipuler les données.
Une fonction a un "mode d'emploi" qui ne s'invente pas : pour l'utiliser, il faut lire la documentation.
var_dump(mixed $value, mixed ...$values): voidgettype(mixed $value): stringstrlen(string $string): intstr_replace(array|string $search,array|string $replace,string|array $subject, int &$count = null): string|arraystrtolower(string $string): stringstrtoupper(string $string): stringsubstr(string $string, int $offset, int | null $length = null): stringstrstr(string $haystack, string $needle, bool $before_needle = false): string|falsestrpos(string $haystack, string $needle, int $offset = 0): int|falsehtmlspecialchars(string $string,int $flags = ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401,?string $encoding = null,bool $double_encode = true): stringstrip_tags(string $string, array|string|null $allowed_tags = null): stringstr_split(string $string, int $length = 1): arrayexplode(string $separator, string $string, int $limit = PHP_INT_MAX): arrayimplode(string $separator, array $array): stringVoir aussi : Fonctions sur les chaînes de caractères
Chaque fonction est documentée pour permettre une compréhension rapide.
gettype()La fonction gettype(mixed $value): string :
$valuemixed: stringvar_dump(mixed $value, mixed ...$values): voidLa fonction var_dump() :
$valuemixed: voidexplode()La fonction explode(string $separator, string $string, int $limit = PHP_INT_MAX): array :
string $separatorstring $stringint $limit = PHP_INT_MAX[2]: array