Signatur
vsprintf(string $format, array $values): string
Beschreibung
Genau wie sprintf(...$values), aber lesbarer bei Arrays.
Parameter
| Name | Typ | Default | Beschreibung |
|---|---|---|---|
| $format Pflicht | string | — | Format-String. |
| $values Pflicht | array | — | Werte-Array. |
Rückgabewert
Typ
string
Beschreibung
Formatiert.
Beispiele
Basis
<?php
echo vsprintf('%s hat %d Punkte', ['Anna', 100]); // Anna hat 100 Punkte