PHP - base64_encode
Trieda
Metóda - base64_encode
(PHP 4, PHP 5, PHP 7)
Converts data to the base64 representation.
Procedurálne
- function base64_encode (string $data) : string
Parametre
| Názov | Dátový typ | Predvolená hodnota | Popis |
|---|---|---|---|
| $data | string | The data being encoded. |
Mávratovej hodnoty
Vracia: string
Returns the encoded data as a string. Returns false if an error
occurred.
Príklady
<?php
echo base64_encode("Hello world!") ."\n";
echo base64_encode(42) ."\n";
echo base64_encode(true) ."\n";
Súvisiace manuály
- function base64_decode (string $data, bool $strict = false) : string
