- array_map: documentation ( source)
- var_dump: documentation ( source)
- bin2hex: documentation ( source)
- base64_decode: documentation ( source)
- explode: documentation ( source)
- trim: documentation ( source)
- base64_encode: documentation ( source)
<?php
$input = "the quick brown fox jumped over the lazy dog 12345";
var_dump(
array_map(
function($a) { return [
$a,
bin2hex(base64_decode($a)),
$r = trim(base64_encode(base64_decode($a)), '='),
$a == $r
]; },
explode(' ', $input)
)
);