3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $mode = '12345'; $length = 8; $small = 'abcdefghijklmnopqrstuvwxyz'; $large = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; $numeric = '0123456789'; switch ($mode) { // 小文字英字 case 'small': $chars = $small; break; // 大文字英字 case 'large': $chars = $large; break; // 小文字英数字 case 'smallalnum': $chars = $small . $numeric; break; // 大文字英数字 case 'largealnum': $chars = $large . $numeric; break; // 数字 case 'num': $chars = $numeric; break; // 大小文字英字 case 'alphabet': $chars = $small . $large; break; // 大小文字英数字 case 'alnum': default: $chars = $small . $large . $numeric; break; } $charsLength = strlen($chars); $password = ''; for ($i = 0; $i < $length; ++$i) { $num = mt_rand(0, $charsLength - 1); $password .= $chars{$num}; } echo $password;
Output for 7.1.0
Mh3ltNzd
Output for 7.0.14
OgXUoqPz
Output for 7.0.6
IbdWAoq9
Output for 7.0.5
WFAJ0DNG
Output for 7.0.4
1pLz8vMt
Output for 7.0.3
2tu9oJZR
Output for 7.0.2
n4UwomvU
Output for 7.0.1
rJKXfvvp
Output for 7.0.0
x7tuZbc1
Output for hhvm-3.12.0
8TNsANCC
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.6.28
BDgsCqY8
Output for 5.6.21
72vutpw6
Output for 5.6.20
Yipd78eB
Output for 5.6.19
oFq812Cc
Output for 5.6.18
YGVVVk5E
Output for 5.6.17
ZzPjppCF
Output for 5.6.16
oQyvKuIH
Output for 5.6.15
CySNa3Q6
Output for 5.6.14
mRkYK3e7
Output for 5.6.13
iB3sA8TQ
Output for 5.6.12
4j3CYxHu
Output for 5.6.11
Ob4Fv4Cb
Output for 5.6.10
QglYnDNQ
Output for 5.6.9
tc2UzOIf
Output for 5.6.8
XfztZvjI
Output for 5.6.7
fcjOIlVI
Output for 5.5.35
bqwkLJRo
Output for 5.5.34
UKjDBCYo
Output for 5.5.33
ueLtqCHF
Output for 5.5.32
n1KS0oUu
Output for 5.5.31
C3eLfQNU
Output for 5.5.30
BMnNOReQ
Output for 5.5.29
LNmTYo5b
Output for 5.5.28
H8hWuleA
Output for 5.5.27
GEhuzKqf
Output for 5.5.26
WxesLq8s
Output for 5.5.25
oIBhQrMH
Output for 5.5.24
cjbq8fDQ
Output for 5.4.45
8wLRlVGm
Output for 5.4.44
tJYz8MZc
Output for 5.4.43
PEjm3MWB
Output for 5.4.42
KB74rqKL
Output for 5.4.41
dOK7I2kH
Output for 5.4.40
5ggy5w8o
Output for 5.4.39
atEk3914
Output for 5.4.38
PNk20o2e
Output for 5.4.37
RAhgO3cT
Output for 5.4.36
wTZpWJWZ
Output for 5.4.35
YK0Yvylp
Output for 5.4.34
ohJisFQZ
Output for 5.4.32
UN8B9vQ8
Output for 5.4.31
dmX1peMl
Output for 5.4.30
LZbWjs1A
Output for 5.4.29
zWfyuj17
Output for 5.4.28
HcvhlyNH
Output for 5.4.27
gqOGDYqz
Output for 5.4.26
406CubWJ
Output for 5.4.25
2lkpRQsF
Output for 5.4.24
neioygkf
Output for 5.4.23
8ayPMn6b
Output for 5.4.22
xjq9R7SA
Output for 5.4.21
MchJTEBD
Output for 5.4.20
qKhCViNI
Output for 5.4.19
3myMWaQG
Output for 5.4.18
RnC7pY8v
Output for 5.4.17
DJZEe9DT
Output for 5.4.16
0dj9v7wR
Output for 5.4.15
tlSnwExB
Output for 5.4.14
IwzpFdXI
Output for 5.4.13
PwTlzpGA
Output for 5.4.12
izyO39et
Output for 5.4.11
0gRMHfPo
Output for 5.4.10
ZdVeZAop
Output for 5.4.9
dWJ7kMBf
Output for 5.4.8
FVtCZF6x
Output for 5.4.7
5hT2jgJo
Output for 5.4.6
uhlaYK1a
Output for 5.4.5
taEU3XrV
Output for 5.4.4
zBWe1GBX
Output for 5.4.3
vz7M17Ww
Output for 5.4.2
RHkjq09K
Output for 5.4.1
YtXd7cvR
Output for 5.4.0
oGQSy0e0
Output for 5.3.29
ocPFdEuO
Output for 5.3.28
syoBseon
Output for 5.3.27
BzrC1azr
Output for 5.3.26
P9OEIT3X
Output for 5.3.25
AES93ejA
Output for 5.3.24
r2n2PG6g
Output for 5.3.23
qy1AftOK
Output for 5.3.22
cdpweMcy
Output for 5.3.21
VYKTCiP1
Output for 5.3.20
ab9dj83A
Output for 5.3.19
JT9NX1gu
Output for 5.3.18
gg0dWCaN
Output for 5.3.17
81hklEXc
Output for 5.3.16
KR9UKYK7
Output for 5.3.15
w4PF7i8n
Output for 5.3.14
Ifu3rQER
Output for 5.3.13
N7MhZj52
Output for 5.3.12
yAT1YxYy
Output for 5.3.11
DqzM7UjB
Output for 5.3.10
9QyYtceP
Output for 5.3.9
bJ2ozGms
Output for 5.3.8
VOAPPJVB
Output for 5.3.7
Fhmhgaui
Output for 5.3.6
XDTbKwkN
Output for 5.3.5
0kiUaBf4
Output for 5.3.4
pI1pBDly
Output for 5.3.3
jxkBhE7E
Output for 5.3.2
WG9dc6CG
Output for 5.3.1
FVMSUrZM
Output for 5.3.0
Lr0Uov00
Output for 5.2.17
woQ9dyL6
Output for 5.2.16
fjcg5mk6
Output for 5.2.15
jsCOrsr3
Output for 5.2.14
2yJwf7do
Output for 5.2.13
a7kt9PxY
Output for 5.2.12
A9xaJAJt
Output for 5.2.11
Fb2YjrED
Output for 5.2.10
l9pX1gN7
Output for 5.2.9
fSnFEiG5
Output for 5.2.8
NV8SlT89
Output for 5.2.7
7FzyXU0H
Output for 5.2.6
3taBfsWz
Output for 5.2.5
gMYaUThL
Output for 5.2.4
Tf4c7mOR
Output for 5.2.3
g41sQUDg
Output for 5.2.2
OFJvOUgY
Output for 5.2.1
lARIKx8J
Output for 5.2.0
m5ExYXR7
Output for 5.1.6
RhkwoKcI
Output for 5.1.5
3InGEbd5
Output for 5.1.4
hvbXEzW8
Output for 5.1.3
gXbPwxLw
Output for 5.1.2
Je0zKbZL
Output for 5.1.1
Ario9rzB
Output for 5.1.0
6p1hr90k
Output for 5.0.5
Q8DIowOk
Output for 5.0.4
oEcDoxBc
Output for 5.0.3
fCR35htF
Output for 5.0.2
gxfRNHBz
Output for 5.0.1
Vr0xDbr4
Output for 5.0.0
eYNRBZKe
Output for 4.4.9
0qrh2mSH
Output for 4.4.8
aO7or1DD
Output for 4.4.7
ExNxpudu
Output for 4.4.6
AvyMHuKM
Output for 4.4.5
0sHInQmN
Output for 4.4.4
C1awNdq7
Output for 4.4.3
S6xKMrat
Output for 4.4.2
69fOFKq7
Output for 4.4.1
KtleyWOz
Output for 4.4.0
LTfNTC5X
Output for 4.3.11
FRkd0NxB
Output for 4.3.10
YFNYg1Fy
Output for 4.3.9
1dqJh82D
Output for 4.3.8
NcNvjM2d
Output for 4.3.7
rlvOOqTo
Output for 4.3.6
t5uGfn0A
Output for 4.3.5
o48Lz2Np
Output for 4.3.4
MFGZu02P
Output for 4.3.3
jHTeLDYL
Output for 4.3.2
GENz5NqN
Output for 4.3.1
FatEaLRd
Output for 4.3.0
jc1SD5yB