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 .= "\002D_"; } $g = substr($c, mt_rand(0, strlen($c) - 1), 1); $r .= $g; if (($g == '_') || ($g == "\002D")) { $s++; } } return $r; } echo multiID(6);
Output for 7.1.0
2ij7DD
Output for 7.0.14
OEO3m
Output for 7.0.6
rNl669
Output for 7.0.5
tBJ5W3
Output for 7.0.4
0ed8XD
Output for 7.0.3
74F0V
Output for 7.0.2
9yp9LP
Output for 7.0.1
6kvYz7
Output for 7.0.0
E6zpX0
Output for 5.6.28
4MsHY3
Output for 5.6.21
LoeWDS
Output for 5.6.20
lnzUbF
Output for 5.6.19
lMiZ5Y
Output for 5.6.18
2EcS0W
Output for 5.6.17
5SDOvv
Output for 5.6.16
oKCo5A
Output for 5.6.15
E6kV3U
Output for 5.6.14
b0AfLk
Output for 5.6.13
I71qXq
Output for 5.6.12
TESgyf
Output for 5.6.11
6TZmgz
Output for 5.6.10
FxyJYO
Output for 5.6.9
TROf
Output for 5.6.8
xtMeL9
Output for 5.6.7
BRPtqS
Output for 5.5.35
w0mtff
Output for 5.5.34
9RxqMn
Output for 5.5.33
piXQg
Output for 5.5.32
IVHqQZ
Output for 5.5.31
21180N
Output for 5.5.30
I66fqV
Output for 5.5.29
9dDDws
Output for 5.5.28
CQuAVO
Output for 5.5.27
tY44wC
Output for 5.5.26
sl0dDo
Output for 5.5.25
b606Bp
Output for 5.5.24
3WD4rs
Output for 5.4.45
8raYTY
Output for 5.4.44
wFDU9W
Output for 5.4.43
ZGs1mR
Output for 5.4.42
QvHa8O
Output for 5.4.41
tN9vLD
Output for 5.4.40
EAjGxe
Output for 5.4.39
0sFgth
Output for 5.4.38
aHQUpQ
Output for 5.4.37
Ah6ql0
Output for 5.4.36
vkFNrW
Output for 5.4.35
tNv5k4
Output for 5.4.34
8Ru2P7
Output for 5.4.32
ufbriP
Output for 5.4.31
Uv_LoD
Output for 5.4.30
yZkhz7
Output for 5.4.29
iSLxas
Output for 5.4.28
SVsjsG
Output for 5.4.27
YYf56V
Output for 5.4.26
B6odr0
Output for 5.4.25
BJ1DAe
Output for 5.4.24
bk023x
Output for 5.4.23
8eB4Fa
Output for 5.4.22
OL9vDa
Output for 5.4.21
t0q6tE
Output for 5.4.20
1dtR6I
Output for 5.4.19
46yyHD
Output for 5.4.18
Y4whbA
Output for 5.4.17
N5UoS4
Output for 5.4.16
aiw0QS
Output for 5.4.15
sPvDdo
Output for 5.4.14
dsGDSI
Output for 5.4.13
vh5kA
Output for 5.4.12
rMIOHj
Output for 5.4.11
frWPdQ
Output for 5.4.10
A0OADY
Output for 5.4.9
zxxWML
Output for 5.4.8
coExLk
Output for 5.4.7
rZncUz
Output for 5.4.6
h5El0E
Output for 5.4.5
pMHP0D
Output for 5.4.4
kTCl2J
Output for 5.4.3
cCDgn8
Output for 5.4.2
GPb6GD
Output for 5.4.1
AKdwRp
Output for 5.4.0
nrjf8M
Output for 5.3.29
07TDku
Output for 5.3.28
m4iW3f
Output for 5.3.27
auefd
Output for 5.3.26
auDeIw
Output for 5.3.25
cTI28w
Output for 5.3.24
WHEhND
Output for 5.3.23
0uRg3D
Output for 5.3.22
5KB4tw
Output for 5.3.21
KBDDo6
Output for 5.3.20
bWMDt3
Output for 5.3.19
fw9ah0
Output for 5.3.18
9ulbxd
Output for 5.3.17
ckPCS
Output for 5.3.16
xQGqnS
Output for 5.3.15
NzkatO
Output for 5.3.14
xOrkPq
Output for 5.3.13
XUmp5z
Output for 5.3.12
wWTNpc
Output for 5.3.11
QE7izC
Output for 5.3.10
TPHPpD
Output for 5.3.9
N7rJFw
Output for 5.3.8
ShzYNj
Output for 5.3.7
57Ae4p
Output for 5.3.6
jW9bjR
Output for 5.3.5
1SneNj
Output for 5.3.4
KRWkCk
Output for 5.3.3
0BDexx
Output for 5.3.2
JrHHhw
Output for 5.3.1
9k1uRm
Output for 5.3.0
e1lXeK
Output for 5.2.17
2Nmwwr
Output for 5.2.16
ckr06l
Output for 5.2.15
FeMzbY
Output for 5.2.14
IDX06I
Output for 5.2.13
eHIw3q
Output for 5.2.12
9_JWST
Output for 5.2.11
zbRiGV
Output for 5.2.10
zXHe3Y
Output for 5.2.9
6xrJTJ
Output for 5.2.8
o7nHBj
Output for 5.2.7
flLVjt
Output for 5.2.6
KwKaQW
Output for 5.2.5
vU_uDL
Output for 5.2.4
lMuobA
Output for 5.2.3
ekKJ4N
Output for 5.2.2
cp1k9O
Output for 5.2.1
yWdm9D
Output for 5.2.0
KiGstW
Output for 5.1.6
ChD0DA
Output for 5.1.5
fmzSNV
Output for 5.1.4
OMmn0T
Output for 5.1.3
5IKi0x
Output for 5.1.2
j9TLVQ
Output for 5.1.1
ePxexB
Output for 5.1.0
rWgs7j
Output for 5.0.5
zzH3_w
Output for 5.0.4
6D7TTK
Output for 5.0.3
dbcidU
Output for 5.0.2
DwD8q3
Output for 5.0.1
aYYpB
Output for 5.0.0
SVOIeM
Output for 4.4.9
O8fHNv
Output for 4.4.8
l5ICZt
Output for 4.4.7
ZOs0zY
Output for 4.4.6
hs5r01
Output for 4.4.5
kWfs9A
Output for 4.4.4
ojDqVt
Output for 4.4.3
dRCtTy
Output for 4.4.2
Tjib75
Output for 4.4.1
X2gg0q
Output for 4.4.0
Kp1uBw
Output for 4.3.11
uPbHld
Output for 4.3.10
NKPwNv
Output for 4.3.9
oGIpFL
Output for 4.3.8
xSA5iV
Output for 4.3.7
ArdBMX
Output for 4.3.6
B5_N5r
Output for 4.3.5
0DWyNX
Output for 4.3.4
s5UvBC
Output for 4.3.3
5fCHB7
Output for 4.3.2
pXHAcf
Output for 4.3.1
1xt7gA
Output for 4.3.0
H0FUOQ