PHP code example of abublihi / guid-to-base64
1. Go to this page and download the library: Download abublihi/guid-to-base64 library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
abublihi / guid-to-base64 example snippets
echo base64_encode("7ea2e22f-31cb-4c97-89eb-1b4501aafe40");
// output is "N2VhMmUyMmYtMzFjYi00Yzk3LTg5ZWItMWI0NTAxYWFmZTQw"
use Abublihi\Guid\ToBase64;
$toBase64 = new ToBase64("7ea2e22f-31cb-4c97-89eb-1b4501aafe40");
echo $toBase64->getBase64(); // output "L+Kifssxl0yJ6xtFAar+QA=="
use Abublihi\Guid\ToBase64;
echo ToBase64::encode("748b2d72-706b-42f8-8b25-82fd8733860f"); // output "ci2LdGtw+EKLJYL9hzOGDw=="