3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function genKey($length) { if($length > 0) { $rand_id=""; for($i=1; $i <= $length; $i++) { mt_srand((double)microtime() * 1000000); $num = mt_rand(1,72); $rand_id .= assign_rand_value($num); } } return $rand_id; } function assign_rand_value($num) { switch($num) { case "1": $rand_value = "a"; break; case "2": $rand_value = "b"; break; case "3": $rand_value = "c"; break; case "4": $rand_value = "d"; break; case "5": $rand_value = "e"; break; case "6": $rand_value = "f"; break; case "7": $rand_value = "g"; break; case "8": $rand_value = "h"; break; case "9": $rand_value = "i"; break; case "10": $rand_value = "j"; break; case "11": $rand_value = "k"; break; case "12": $rand_value = "l"; break; case "13": $rand_value = "m"; break; case "14": $rand_value = "n"; break; case "15": $rand_value = "o"; break; case "16": $rand_value = "p"; break; case "17": $rand_value = "q"; break; case "18": $rand_value = "r"; break; case "19": $rand_value = "s"; break; case "20": $rand_value = "t"; break; case "21": $rand_value = "u"; break; case "22": $rand_value = "v"; break; case "23": $rand_value = "w"; break; case "24": $rand_value = "x"; break; case "25": $rand_value = "y"; break; case "26": $rand_value = "z"; break; case "27": $rand_value = "0"; break; case "28": $rand_value = "1"; break; case "29": $rand_value = "2"; break; case "30": $rand_value = "3"; break; case "31": $rand_value = "4"; break; case "32": $rand_value = "5"; break; case "33": $rand_value = "6"; break; case "34": $rand_value = "7"; break; case "35": $rand_value = "8"; break; case "36": $rand_value = "9"; break; case "37": $rand_value = "*"; break; case "38": $rand_value = "~"; break; case "39": $rand_value = "-"; break; case "40": $rand_value = "|"; break; case "41": $rand_value = "^"; break; case "42": $rand_value = "%"; break; case "43": $rand_value = " "; break; case "44": $rand_value = "_"; break; case "45": $rand_value = "+"; break; case "46": $rand_value = "="; break; case "47": $rand_value = "A"; break; case "48": $rand_value = "B"; break; case "49": $rand_value = "C"; break; case "50": $rand_value = "D"; break; case "51": $rand_value = "E"; break; case "52": $rand_value = "F"; break; case "53": $rand_value = "G"; break; case "54": $rand_value = "H"; break; case "55": $rand_value = "I"; break; case "56": $rand_value = "J"; break; case "57": $rand_value = "K"; break; case "58": $rand_value = "L"; break; case "59": $rand_value = "M"; break; case "60": $rand_value = "N"; break; case "61": $rand_value = "O"; break; case "62": $rand_value = "P"; break; case "63": $rand_value = "Q"; break; case "64": $rand_value = "R"; break; case "65": $rand_value = "S"; break; case "66": $rand_value = "T"; break; case "67": $rand_value = "U"; break; case "68": $rand_value = "V"; break; case "69": $rand_value = "W"; break; case "70": $rand_value = "X"; break; case "71": $rand_value = "Y"; break; case "72": $rand_value = "Z"; break; } return $rand_value; } echo genKey(24);
Output for 7.1.0
|Q3TiPPYS9gyH=rpT%X*DF3D
Output for 7.0.14
pV*+EA3Wbkj-dvbqr_Ermaud
Output for 7.0.10
X-lyXqN~fx*fkfSj2V3cKbX7
Output for 7.0.9
XGQTK1tnLh4Bgqe+JhcSNCEw
Output for 7.0.8
pyY~uJ|Qtm3cXrNyBdv6^7H9
Output for 7.0.7
K0MKX8H*awQifcunDxt~YAaE
Output for 7.0.6
=ChX4gdMVxtYW qYwqzo Wp1
Output for 7.0.5
a2Fy1dONBigsXPtb-K|6|oDt
Output for 7.0.4
iZHd~DoWRw3*d=~^v-MliDr6
Output for 7.0.3
jPv80QlcSPNhosVl_f~6zDrJ
Output for 7.0.2
dHHXTcJb%k0K3Yx==zmC201V
Output for 7.0.1
p53|~Lx7R5M*du~^v-MFEs-A
Output for 7.0.0
8VdHN|WB4d3e=yhNf6UtSYl7
Output for hhvm-3.12.0
PEtZI4Vf3Gt|FkT1hd~fxXsd
Output for hhvm-3.10.0
H=loeY~-4_1vA3xCF^Z^yMNW
Output for 5.6.28
iF4T2yGHBrIgyuG*oLAWBK%X
Output for 5.6.25
8wG_Vpnb30LPN5aIdHutB4I5
Output for 5.6.24
5zMh|VWgxTYWFqY q~Y9% KW
Output for 5.6.23
p*Tw=RX0~KUru_mPCC^40Zrb
Output for 5.6.22
VH~D7Rk1RuYD7oF_-^xdbEiI
Output for 5.6.21
EaCok0LEE_lfHm%MmSH5dw8O
Output for 5.6.20
O8eRkyK37 uIUDc0pYS47B3T
Output for 5.6.19
yx55ILX|DkS477Bp^wA9l13t
Output for 5.6.18
QhuPMrN0i~l13tSJ3_KkfkGz
Output for 5.6.17
qSHu-oMR8G9N4h6DA0THbz15
Output for 5.6.16
xtCsG4b KR6qtF*VIq~9 p|1
Output for 5.6.15
^dswzWXq_%rl7lO*yip*G9=m
Output for 5.6.14
pBK%ru_j=GBvg6LqrbGEezVE
Output for 5.6.13
mbOKG8Bo8FYza0oO^x~^v~t8
Output for 5.6.12
=GoO=SG xP~9hCcOwSsVUGde
Output for 5.6.11
p*f4mLpW3LKUru_j=GBv-ZZr
Output for 5.6.10
V++QhxLD%tKwf8HKR_%KfC8n
Output for 5.6.9
Ckk_YxcKCh0ySHgxtD-qYjVe
Output for 5.6.8
xRBPY-jQVFq8QBYhg3TNNQeh
Output for 5.6.7
rEKDpXPU2WGZMATvbU2tGsIH
Output for 5.6.6
G5m AK~US|gwon_e6IbFtXKN
Output for 5.6.5
i8JHTpmZi5hwLOQoSh^U3Dar
Output for 5.6.4
xYsUbz8YrleG_VWm-0LLV7ae
Output for 5.6.3
3Lt+j=+Wf1gU^68 Qwz-_Pmw
Output for 5.6.2
V^ VIq~9 p|0taFM5s2uG3cX
Output for 5.6.1
In|HXEfPGBvg6Lf3OG_7LRzB
Output for 5.6.0
ZABfoOwv~q8Egqe+SJM-SN5h
Output for 5.5.38
ZfT3kUiR8YqeCsX6 KRTDxRt
Output for 5.5.37
xM%kH_X1HId~nf1gU^68*ZhD
Output for 5.5.36
XIJ4fLpW3B9+ xCfLd3 ^40k
Output for 5.5.35
J jowiafjBy3+jORnCh0qlYQ
Output for 5.5.34
szrNoBCOQ8qNrrvqQoKr_lfH
Output for 5.5.33
~Rk1RE~^v-Mlw_VSuK1*htI|
Output for 5.5.32
Bm0yMLf3ON_7=iEE19Bxmk_I
Output for 5.5.31
LVADxVDoWmTYJmJ|NviqKzIb
Output for 5.5.30
kObVMFrGAHdbEtg^ xPE1o2t
Output for 5.5.29
IRLZW0nJHru_m=GBo-ZZrbGE
Output for 5.5.28
_+Dq+gW1ma=y*utfgU^6pKIR
Output for 5.5.27
GW+DDRyV7j=+xutfgQ^6pKIR
Output for 5.5.26
6l4f4C|Ky8DZBpifC^~QSGlh
Output for 5.5.25
HEqcO oSrM=52w0^33ogYph4
Output for 5.5.24
gTDJRysr^Qb5aG 5XmOrbF-l
Output for 5.5.23
JUXEjP~Bo8YZCOGSOeRkzMk2
Output for 5.5.22
vY8IzChySGgwttWXydoI_uKM
Output for 5.5.21
8hjl0b2ySy-zrYy2IoA|=nAW
Output for 5.5.20
*~D7ebk3h d~^VMlwrVundbE
Output for 5.5.19
wQE2T0jlRWR63B3WonEJahRu
Output for 5.5.18
TostDtzrNbrCX5wf8H*R_gKf
Output for 5.5.16
=MpVys+|EL1Wbw3hdu~^VrGi
Output for 5.5.15
mh%8O5E2T^s=5+arS56uzrE4
Output for 5.5.14
%pPGqox68iiRhj_OVozBPY%T
Output for 5.5.13
M1Aly%FnXErDH8Cycpv=%+U_
Output for 5.5.12
ubqrZj_OVozBPY%jIVFf8Qtl
Output for 5.5.11
85MkBxA2VnwvIhht~Ifu1sjk
Output for 5.5.10
x3FT%ly7TR-NDXlfp=%k0KYh
Output for 5.5.9
tu3Ie0i9NZjxrb0Ykrbbz8Yr
Output for 5.5.8
dW0QmNb5u9cXdbyMhnBHpSTy
Output for 5.5.7
0qHQ3oprXW~ltwa7Gb0THrbb
Output for 5.5.6
0%XCjPGBvg6Lf3bGEezVozBP
Output for 5.5.5
FRz19Y8A2_VDdIphkSI7u1sj
Output for 5.5.4
Wo5C AK~Uj*Ewon_e6IbFtF0
Output for 5.5.3
8a*O-EGd8nUNXF*_AsIfojWJ
Output for 5.5.2
72ZUaptS*zUi8eym% uMz2b0
Output for 5.5.1
9HtI9IPjRA=B4cHO tO7w^t_
Output for 5.5.0
zyI9IPjRA=B6cOO4Xz7wxQ_U
Output for 5.4.45
KlLpXqB~iO4f^x-2Sj2VMLTX
Output for 5.4.44
Db^36_^7H9Q%iMCZHE-37ebw
Output for 5.4.43
5TN^-x=BHQpAC1H~D71kj-dv
Output for 5.4.42
9yMhnMHpMpAy5mEAxWM1 O^q
Output for 5.4.41
%8Nb2G6cXdb^-xg9H=DVC+|~
Output for 5.4.40
wkt8E_lfHm4MmEaCu=uBQESh
Output for 5.4.39
%S*a2rRRR=RXDsKUru_m=~Bo
Output for 5.4.38
1z3YxIqeXsXV KLz5_-DYj5g
Output for 5.4.37
I~kfYEBE=bS%MmSHld%Vf oZ
Output for 5.4.36
6k-xg9HpSpAC1H~poFM3RdYv
Output for 5.4.35
_fw^ok0L8B_l+S%MH5i5d%Vf
Output for 5.4.34
sof^xa1tk%EB_lfH%*Gcoai5
Output for 5.4.32
Ka3dD1VtsrNKxKAmOQ_gifc8
Output for 5.4.31
^DtAMHQFKx8UF~_Lfq|a^oC~
Output for 5.4.30
oROgqMi_6vuw*iIzLtEJLfP^
Output for 5.4.29
WWnXphrRRRHf0y|oCHXCjP~q
Output for 5.4.28
3Y=jyMsX6dMLTt%Xydogmv 1
Output for 5.4.27
dG~LVUi8eymB llBSb03OwR6
Output for 5.4.26
t VptFMJ5uD3WrNyMvnM|xQ%
Output for 5.4.25
f-y3H-zrYy2r*l7o=RW3LKUE
Output for 5.4.24
MvK0Og|oWgZqifDt-ULGtjXT
Output for 5.4.23
2pA1I6WhO3b5 5quWrv26qf2
Output for 5.4.22
6Vw5YA|0yYMPlP6aXKTMvnBH
Output for 5.4.21
Dj~mv_uKIJbm5=DTTdSFV=|x
Output for 5.4.20
%DZdZV_i4%e=SN6Ug^+7 Ti9
Output for 5.4.19
Q8pKterPNmM=4_DxGAAl|mTY
Output for 5.4.18
=hhg03S43RIAOci j98dxZhZ
Output for 5.4.17
yvCQQjGlhMVQfxVwZiQY6msJ
Output for 5.4.16
+ZnyyyZIFJ=Drl3EmCr+Fadd
Output for 5.4.15
3hEW=43RPF6B Wvn1WYaTWi4
Output for 5.4.14
fnYWmvKBZR^Wlj4-3_Fy-YsG
Output for 5.4.13
fS3ur6McbLIcJ=jL6 SF_+ZF
Output for 5.4.12
gEuAHU4iW_FGJwsGW8Jy6sq9
Output for 5.4.11
EJhvvL11GeBs4vYlCCBq%o0v
Output for 5.4.10
4p+T_LtUdAoGcBQ2zqF _T1*
Output for 5.4.9
0%mgKBZRvKzdhQvdJ1y-Ys4v
Output for 5.4.8
3J46-INA0cAG9W%Y*NDekb
Output for 5.4.7
IWQ46AF-N^Dyq|Oz1XiCZ6Uc
Output for 5.4.6
=0vpCPSxxMF85H__YiuKCL++
Output for 5.4.5
_ec~gY|eN4yT_L3|gZnHfeB5
Output for 5.4.4
TI|BP^sP%CP%owlBsO2cclnC
Output for 5.4.3
2nYWmvKBZR^WJuQvdJ1GeBYb
Output for 5.4.2
bM%|w5b3__h2Ouln1S5t+5Nz
Output for 5.4.1
qLenY+8^iD^ R^uJu6i3_8B-
Output for 5.4.0
0pHgpFJL5gT-L3|8vXGcBQGz
Output for 5.3.29
IaX*E8lyHwdWoJP|k=DpUFzH
Output for 5.3.28
cPSjtlZ~^1S9YatB53h^aMaq
Output for 5.3.27
yiSg XGcBQGzq SUTNDekb f
Output for 5.3.26
QsDfKrhMuo9FXF78kx71TIHJ
Output for 5.3.25
p4gT-vI|8vnHfeB5GzqF UT1
Output for 5.3.24
DNHs%FjNW7L7a%BjAPH|BdJS
Output for 5.3.23
iEhvKildhQn3p1FyZYY4vS8J
Output for 5.3.22
jV8iU^vBGW9TX6 5XjGjNAC9
Output for 5.3.21
_VNpHhl2sp+T-CS8^HoBI69F
Output for 5.3.20
zS^a^z6WQfJ6KmWrO|zzDfFt
Output for 5.3.19
BCv1IoRB*h%cKC5853Wh3=3Z
Output for 5.3.18
pkIU oGeA|69F9YhA%HfZ5ws
Output for 5.3.17
H=N4gT_L3|gZnHfFG|6R SUR
Output for 5.3.16
3-w1Xaf=6J9_v-u~BjcJJyQT
Output for 5.3.15
ZA25W4n7hA%HfZ5wsIuB7QnK
Output for 5.3.14
5M|H3*h%u~S++NWh3=3Z9pru
Output for 5.3.13
k8^0oBI69W%TX6 |OIuBAr2n
Output for 5.3.12
NWUQ3J-Zw1XIJbKqJ0TWPp~h
Output for 5.3.11
R9Xvf9Nsd0v5ISW2RB*h%cKC
Output for 5.3.10
6T=5lWN=K3QL+YK*=Ew2eZms
Output for 5.3.9
-lh-3J--B1XIJbKqJ0TeNeck
Output for 5.3.8
ld~yJh1XIJbKqJ_TWPp~cJ=L
Output for 5.3.7
lQGkiSZGAGlT _Us%k* 5aIX
Output for 5.3.6
+dZn0fFT26R SUR1*%Hb=fQf
Output for 5.3.5
L^bcA25WS%hs%kf 5Xj3bdAC
Output for 5.3.4
und1B-w1XIJCv_o0tVNpHhl2
Output for 5.3.3
=T-iRg oGeTGq4_VubZfDTeQ
Output for 5.3.2
8YXaf=6J9_v-ZeckhJJyQT-C
Output for 5.3.1
fnRA%kf 5wshuB7=|2Oq*Lwv
Output for 5.3.0
8d^0oB52lTS_UA%k*Z5wsbeA