3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
$input = "ZtJD4aw7EbRToALr;ZtHp0QGo0EF80LG8xtR;deuW90KG9ty70e"; $default = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; $custom = "ZYXWVUTSRQPONMLKJIHGFEDCBAzyxwvutsrqponmlkjihgfedcba9876543210+/"; $encoded = strtr(base64_encode($input), $default, $custom); echo $encoded; <?php
Output for 4.3.0 - 5.4.32
$input = "ZtJD4aw7EbRToALr;ZtHp0QGo0EF80LG8xtR;deuW90KG9ty70e"; $default = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; $custom = "ZYXWVUTSRQPONMLKJIHGFEDCBAzyxwvutsrqponmlkjihgfedcba9876543210+/"; $encoded = strtr(base64_encode($input), $default, $custom); echo $encoded; <?php