Signatur
sscanf(string $string, string $format, mixed &...$vars): array|int|null
Beschreibung
Für strukturierte Log-Zeilen oder feste Formate.
Parameter
| Name | Typ | Default | Beschreibung |
|---|---|---|---|
| $string Pflicht | string | — | Eingabe. |
| $format Pflicht | string | — | Format-String. |
Rückgabewert
Typ
array|int|null
Beschreibung
Parsed values.
Beispiele
Log parsen
<?php
[$year, $month, $day] = sscanf('2026-09-18', '%d-%d-%d');