3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php mt_srand(42); for ($i = 0; $i < 20; $i++) { $key = generate_key(); $len = strlen($key); echo "{$key} {$len}\n"; } function generate_key() { return base64_urlencode(rand_buffer(48)); } function base64_urlencode($buf) { return str_replace(array('+', '/', '='), array('-', '_', ''), base64_encode($buf)); } function rand_buffer($n) { // return openssl_random_pseudo_bytes($n); $buf = ""; for ($i = 0; $i < $n; $i++) { $buf .= chr(mt_rand(0, 255)); } return $buf; }
Output for 7.1.0
ZrNcDmpHvBRmedLWSspXdGNnl4KVNAFX650lgb-7FKDLORX861gw2jr-qf_bu88O 64 vb2uvTJrNvM_-ILkMoYUSKYRg1g7DfH5CFk0gVNbbrvGq_wHriLNUKMxZ4MB_YU1 64 aQM13L6R2Suhyb3jDV4vDsfN1vv4vSfUz-xRbjQXmdj7u3vsKJwOLEBYRghXgOuH 64 1z6K8lCHoqIgegTp5vkoG4bIRwuhIC_2lj3XJGKrZ9XaIsDiZK7NggAE2fb-jWYa 64 iM4OWSl7zLI-X-bwM_xfg93klubsjqocIwyfRrryVRtBqSw9uPSFGxtrK1MdvUp_ 64 -fZb2Oa94IB4Gr14c8zoAmbFx5qIPaTgMumrl846dZ9f1-izcD3wuTML_SaBgnBk 64 cLdQunABgds1VuTf4ICSfYE0q9mfxZ_2Q7bKt3qQ_iUXRHNhxdWK_u-PYMh7ukXP 64 XAKT-7qjklnC_pKTX8Yz6KCnfyZRZ4AK27jYsZae3SliBvuPWW_48ztwAYAv_YvE 64 JJ_69gjoYpIvz4KTlzV3oJdzSnDHo6VnU_3ib_3YYphckX9tUcE1os-8qOOgQyCN 64 FC-T93-HhsKQfyCvy7py1XYV7Z0l5WwytQcaGuEUHWAbbr_gxPs8L5IDIr8w_xCr 64 253cLXQFYnvoJBdc8C20XmK74HO-_NSf1qD_Qn8RGOneNTlCZ60XcR-uVZbBfprp 64 gdkQZ6CIKvWvJtyp9hliMZiXDDv5hjgjrBNAB__tj43LctaOW2FBH9a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