3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $data = 'eyJEU19NRVJDSEFOVF9BTU9VTlQiOiIxNDUiLCJEU19NRVJDSEFOVF9PUkRFUiI6IjE0NDU4NTY2MDYiLCJEU19NRVJDSEFOVF9NRVJDSEFOVENPREUiOiI5OTkwMDg4ODEiLCJEU19NRVJDSEFOVF9DVVJSRU5DWSI6Ijk3OCIsIkRTX01FUkNIQU5UX1RSQU5TQUNUSU9OVFlQRSI6IjAiLCJEU19NRVJDSEFOVF9URVJNSU5BTCI6IjMwIiwiRFNfTUVSQ0hBTlRfTUVSQ0hBTlRVUkwiOiJodHRwczovL2VqZW1wbG8vZWplbXBsb19VUkxfTm90aWYucGhwIiwiRFNfTUVSQ0hBTlRfVVJMT0siOiJodHRwczovL2VqZW1wbG8vZWplbXBsb19VUkxfT0tfS08ucGhwIiwiRFNfTUVSQ0hBTlRfVVJMS08iOiJodHRwczovL2VqZW1wbG8vZWplbXBsb19VUkxfT0tfS08ucGhwIn0='; function base64_url_decode($input){ return base64_decode(strtr($input, '-_', '+/')); } function base64_url_encode($input){ return strtr(base64_encode($input), '+/', '-_'); } $dat = base64_url_decode($data); $dat2 = base64_url_encode(dat); echo $dat2;
based on HL0Hg
Output for 7.2.0
Warning: Use of undefined constant dat - assumed 'dat' (this will throw an Error in a future version of PHP) in /in/q6pLs on line 13 ZGF0
Output for 5.3.19 - 7.1.10
Notice: Use of undefined constant dat - assumed 'dat' in /in/q6pLs on line 13 ZGF0