3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function multiID($n=32) { for ($x=$s=0,$r=null; $x<$n; $x++) { $c = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234567890'; if (($x<$n) && ($x > 0) && ($s < 2)) { $c .= '-_'; } $g = substr($c, mt_rand(0, strlen($c) - 1), 1); $r .= $g; if (($g == '_') || ($g == '-')) { $s++; } } return $r; } echo multiID(6);
Output for 7.1.0
cX0sma
Output for 7.0.14
U_c4r3
Output for 7.0.6
9LcYQZ
Output for 7.0.5
i4q7vz
Output for 7.0.4
pNStf3
Output for 7.0.3
AqrsPR
Output for 7.0.2
wo4mwJ
Output for 7.0.1
qhGX8Q
Output for 7.0.0
i_5Vq0
Output for hhvm-3.12.0
guQ0o1
Output for hhvm-3.10.0
5_4Sga
Output for 5.6.28
wSa0vm
Output for 5.6.21
ceV_fL
Output for 5.6.20
l5W2av
Output for 5.6.19
AWbC23
Output for 5.6.18
bT7ALy
Output for 5.6.17
vfvliG
Output for 5.6.16
fTlIKp
Output for 5.6.15
0wnQhn
Output for 5.6.14
k5uEZ9
Output for 5.6.13
BwpSdk
Output for 5.6.12
rC6-U9
Output for 5.6.11
ljIPRu
Output for 5.6.10
C6ya_0
Output for 5.6.9
QurggZ
Output for 5.6.8
ogpDoR
Output for 5.5.35
YjUrXq
Output for 5.5.34
EuxahA
Output for 5.5.33
lM3UOZ
Output for 5.5.32
fTk68F
Output for 5.5.31
jMk4Om
Output for 5.5.30
ROJZO0
Output for 5.5.29
tPCX5O
Output for 5.5.28
946cxK
Output for 5.5.27
j_4fdh
Output for 5.5.26
L3B3Lc
Output for 5.5.25
P22VNu
Output for 5.5.24
ra0330
Output for 5.4.45
yfmTyR
Output for 5.4.44
y0R9KL
Output for 5.4.43
MWy2FM
Output for 5.4.42
EXiaeT
Output for 5.4.41
N_xGOk
Output for 5.4.40
48pXOc
Output for 5.4.39
pKtiQa
Output for 5.4.38
AthypV
Output for 5.4.37
8enczT
Output for 5.4.36
0o_SFU
Output for 5.4.35
nMyB6H
Output for 5.4.34
31Jqzt
Output for 5.4.32
ML_5WI
Output for 5.4.31
aJDM9-
Output for 5.4.30
A71w0K
Output for 5.4.29
BYT4VN
Output for 5.4.28
MHRWIZ
Output for 5.4.27
Zwgf2O
Output for 5.4.26
G0qAY6
Output for 5.4.25
ZgrrL_
Output for 5.4.24
LEtIxj
Output for 5.4.23
XN31qO
Output for 5.4.22
ytenAH
Output for 5.4.21
Lnt64x
Output for 5.4.20
F3uBzU
Output for 5.4.19
0wJtyp
Output for 5.4.18
PULTgz
Output for 5.4.17
Yq1PkS
Output for 5.4.16
omvaJq
Output for 5.4.15
fixn0k
Output for 5.4.14
iafFqd
Output for 5.4.13
zKTvnx
Output for 5.4.12
mry6EW
Output for 5.4.11
dWBcz0
Output for 5.4.10
OfY_gl
Output for 5.4.9
oXGekn
Output for 5.4.8
8gm8Ae
Output for 5.4.7
540ilB
Output for 5.4.6
YS9nnw
Output for 5.4.5
V7K9ev
Output for 5.4.4
OYy4PY
Output for 5.4.3
G9Aq6Y
Output for 5.4.2
PEVIN6
Output for 5.4.1
r54-JB
Output for 5.4.0
IQFeE0
Output for 5.3.29
WyGYHy
Output for 5.3.28
hk0srb
Output for 5.3.27
d62MCb
Output for 5.3.26
NI8Fg8
Output for 5.3.25
LEMuAW
Output for 5.3.24
0dsdyx
Output for 5.3.23
1aDk56
Output for 5.3.22
ASkn1j
Output for 5.3.21
DeHuM3
Output for 5.3.20
6jaGvP
Output for 5.3.19
dezRM8
Output for 5.3.18
O3-NsL
Output for 5.3.17
DYF6cR
Output for 5.3.16
vwQLiG
Output for 5.3.15
7khajy
Output for 5.3.14
d7VYTI
Output for 5.3.13
HCiQII
Output for 5.3.12
2nYbdl
Output for 5.3.11
HnmDeE
Output for 5.3.10
ADgLl7
Output for 5.3.9
0rE1FU
Output for 5.3.8
o9OqiN
Output for 5.3.7
uWkwa8
Output for 5.3.6
F5VtQ8
Output for 5.3.5
VsRNa0
Output for 5.3.4
W6wm2-
Output for 5.3.3
TPIk7I
Output for 5.3.2
MW6CRl
Output for 5.3.1
R_tU_T
Output for 5.3.0
sefOtf
Output for 5.2.17
GE0Qoy
Output for 5.2.16
G1TaNf
Output for 5.2.15
ArdTX0
Output for 5.2.14
IN9MG_
Output for 5.2.13
AMeyNu
Output for 5.2.12
5Mviub
Output for 5.2.11
Z5oYgc
Output for 5.2.10
XAX6Fm
Output for 5.2.9
Mb99Hg
Output for 5.2.8
haGUgm
Output for 5.2.7
v1gRHY
Output for 5.2.6
gRMsis
Output for 5.2.5
Iujxqx
Output for 5.2.4
7RAPot
Output for 5.2.3
ZOJ-We
Output for 5.2.2
wD50-2
Output for 5.2.1
Inj7np
Output for 5.2.0
u1RYKi
Output for 5.1.6
lPRM31
Output for 5.1.5
jzzybx
Output for 5.1.4
92Nb-4
Output for 5.1.3
eFnt2e
Output for 5.1.2
Vck0Z6
Output for 5.1.1
Kr0oQe
Output for 5.1.0
MIieUY
Output for 5.0.5
4MT1XP
Output for 5.0.4
N0m0D0
Output for 5.0.3
q-vcAM
Output for 5.0.2
0OKTwu
Output for 5.0.1
ep0bF_
Output for 5.0.0
EsfhCd
Output for 4.4.9
tKx9GC
Output for 4.4.8
33czjR
Output for 4.4.7
Sw6ZB5
Output for 4.4.6
qTFzWQ
Output for 4.4.5
p5j3TH
Output for 4.4.4
aIDuTE
Output for 4.4.3
D2J6BV
Output for 4.4.2
yDkXxI
Output for 4.4.1
rHnJ_P
Output for 4.4.0
h_vDP7
Output for 4.3.11
NTSJfp
Output for 4.3.10
q46f2j
Output for 4.3.9
74QJIU
Output for 4.3.8
lohRzD
Output for 4.3.7
Jth0RJ
Output for 4.3.6
RPk__5
Output for 4.3.5
Xt038J
Output for 4.3.4
Y3SZK1
Output for 4.3.3
MZoR7q
Output for 4.3.2
GIjiIf
Output for 4.3.1
7mlC0p
Output for 4.3.0
MPw0r0