3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php mt_srand(42); for ($i = 0; $i < 20; $i++) { echo_key(); } function echo_key() { $buf = rand_buffer(49); echo base64_encode($buf) . "\n"; echo base64_urlencode($buf) . "\n"; } function base64_urlencode($buf) { return str_replace(array('+', '/', '='), array('-', '_', ''), base64_encode($buf)); } function rand_buffer($n) { //try { // $buf = openssl_random_pseudo_bytes($n); //} catch (Exception $e) { $buf = ""; for ($i = 0; $i < $n; $i++) { $buf .= chr(mt_rand(0, 255)); } //} return $buf; }
Output for 7.1.0
ZrNcDmpHvBRmedLWSspXdGNnl4KVNAFX650lgb+7FKDLORX861gw2jr+qf/bu88OvQ== ZrNcDmpHvBRmedLWSspXdGNnl4KVNAFX650lgb-7FKDLORX861gw2jr-qf_bu88OvQ va69Mms28z/4guQyhhRIphGDWDsN8fkIWTSBU1tuu8ar/AeuIs1QozFngwH9hTVpAw== va69Mms28z_4guQyhhRIphGDWDsN8fkIWTSBU1tuu8ar_AeuIs1QozFngwH9hTVpAw Ndy+kdkrocm94w1eLw7Hzdb7+L0n1M/sUW40F5nY+7t77CicDixAWEYIV4Drh9c+ig== Ndy-kdkrocm94w1eLw7Hzdb7-L0n1M_sUW40F5nY-7t77CicDixAWEYIV4Drh9c-ig 8lCHoqIgegTp5vkoG4bIRwuhIC/2lj3XJGKrZ9XaIsDiZK7NggAE2fb+jWYaiM4OWQ== 8lCHoqIgegTp5vkoG4bIRwuhIC_2lj3XJGKrZ9XaIsDiZK7NggAE2fb-jWYaiM4OWQ KXvMsj5f5vAz/F+D3eSW5uyOqhwjDJ9GuvJVG0GpLD249IUbG2srUx29Sn/59lvY5g== KXvMsj5f5vAz_F-D3eSW5uyOqhwjDJ9GuvJVG0GpLD249IUbG2srUx29Sn_59lvY5g veCAeBq9eHPM6AJmxceaiD2k4DLpq5fOOnWfX9fos3A98LkzC/0mgYJwZHC3ULpwAQ== veCAeBq9eHPM6AJmxceaiD2k4DLpq5fOOnWfX9fos3A98Lkz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