3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "2fe3269fa210706de21ff97cc964590ec5bddd6677885fc55cfa6bfd94924822"; $str_64 = base64_encode($str); echo $str_64; echo "\n"; echo base64_decode($str_64); echo "\n"; echo "\n"; $str2 = "hoge"; $str2_h = hash_hmac('sha256',$str2,true); $str_64_2 = base64_encode($str2_h); echo $str_64_2; echo "\n"; echo base64_decode($str_64_2); echo "\n"; echo $str2_h; echo "\n"; echo "\n";
based on unLK5
Output for 7.3.0 - 7.3.26, 7.4.0 - 7.4.14, 8.0.0 - 8.0.2
MmZlMzI2OWZhMjEwNzA2ZGUyMWZmOTdjYzk2NDU5MGVjNWJkZGQ2Njc3ODg1ZmM1NWNmYTZiZmQ5NDkyNDgyMg== 2fe3269fa210706de21ff97cc964590ec5bddd6677885fc55cfa6bfd94924822 NDkxZGVhNTQyN2UxZDllMzQ1YjBiYTdkNDQwOTZiZDg5MWRlMmJhMjcwYjk5ZGFjYzhhNzA1ZmU4MGU0MzA5ZQ== 491dea5427e1d9e345b0ba7d44096bd891de2ba270b99dacc8a705fe80e4309e 491dea5427e1d9e345b0ba7d44096bd891de2ba270b99dacc8a705fe80e4309e