3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function generate_password($length = 8, $complex=3) { $min = "abcdefghijklmnopqrstuvwxyz"; $num = "0123456789"; $maj = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; $symb = "!@#$%^&*()_-=+;:,.?"; $chars = $min; if ($complex >= 2) { $chars .= $num; } if ($complex >= 3) { $chars .= $maj; } if ($complex >= 4) { $chars .= $symb; } $password = substr( str_shuffle( $chars ), 0, $length ); return $password; } echo generate_password(8); ?>
based on YFDuh
Output for 7.2.0
tl1F40Vh
Output for 7.1.10
0sB6YIuQ
Output for 7.1.7
N5dro0mw
Output for 7.1.6
dImqlshL
Output for 7.1.5
l9Je5Oyu
Output for 7.1.0
gMU410DW
Output for 7.0.20
Whuz6OY0
Output for 7.0.6
M9LntlXC
Output for 7.0.5
e7UvgsV1
Output for 7.0.4
e6gBnvab
Output for 7.0.3
gqk3djTZ
Output for 7.0.2
FQjeJWOv
Output for 7.0.1
tgxU2TFw
Output for 7.0.0
9c6iwKHP
Output for 5.6.28
irRTQGoH
Output for 5.6.21
IbfyKYEB
Output for 5.6.20
iODVL7KZ
Output for 5.6.19
4DW1ZgPe
Output for 5.6.18
hxWYy2bf
Output for 5.6.17
HpU7cCQX
Output for 5.6.16
Zr1C6Tkq
Output for 5.6.15
GTl3Xowe
Output for 5.6.14
Ik9trdwO
Output for 5.6.13
TLJUNoeW
Output for 5.6.12
R9q53nYA
Output for 5.6.11
3hrPg1fE
Output for 5.6.10
sESogFAv
Output for 5.6.9
qfCXymVv
Output for 5.6.8
TRMd7e3Z
Output for 5.6.7
7Z6laTEC
Output for 5.5.35
5ewM2TJH
Output for 5.5.34
yoJK9ezE
Output for 5.5.33
DWC3A0SL
Output for 5.5.32
aYShPsX2
Output for 5.5.31
1Y2CZaof
Output for 5.5.30
8vPTzjro
Output for 5.5.29
02URlXzd
Output for 5.5.28
yRqxsMWT
Output for 5.5.27
swi4MLAk
Output for 5.5.26
Qk0qOJ5r
Output for 5.5.25
M6x2Blh9
Output for 5.5.24
DbIin4u5
Output for 5.4.45
de5i8JNB
Output for 5.4.44
eR81Y2wA
Output for 5.4.43
7fpOulRJ
Output for 5.4.42
OynYbU0F
Output for 5.4.41
Dybq5wSj
Output for 5.4.40
4o8hf2P9
Output for 5.4.39
qh3M2rB4
Output for 5.4.38
p54so2eF
Output for 5.4.37
dZoShPlW
Output for 5.4.36
f1nolpH5
Output for 5.4.35
cGzPBQMH
Output for 5.4.34
hZ0CS9A6
Output for 5.4.32
FoNuS2EX
Output for 5.4.31
BwmHZq5R
Output for 5.4.30
cyO7pM2N
Output for 5.4.29
rGPeJmRK
Output for 5.4.28
McsubQxJ
Output for 5.4.27
WmYleH2M
Output for 5.4.26
hvumB8yx
Output for 5.4.25
XtkpEJh7
Output for 5.4.24
ShvAJV9T
Output for 5.4.23
Zw12cMRy
Output for 5.4.22
KDCIVhrG
Output for 5.4.21
OgU8cyW3
Output for 5.4.20
Vo7vFwjS
Output for 5.4.19
9P0yw4Zd
Output for 5.4.18
boz9j4Bp
Output for 5.4.17
aM5cSWxX
Output for 5.4.16
lbcwdgFJ
Output for 5.4.15
bBcICHvS
Output for 5.4.14
SmpPiNZD
Output for 5.4.13
KxFCHzVQ
Output for 5.4.12
WGbT0lLc
Output for 5.4.11
F4EWUmgV
Output for 5.4.10
uBrtW9s4
Output for 5.4.9
wL1IDjJW
Output for 5.4.8
V0slbg5A
Output for 5.4.7
uXqSwlab
Output for 5.4.6
vNebcxPW
Output for 5.4.5
K6W7ZbAE
Output for 5.4.4
chAinJqO
Output for 5.4.3
4812oS6L
Output for 5.4.2
Fm8IPlqV
Output for 5.3.29
y2Teal78
Output for 5.3.28
hzOpjH2Q
Output for 5.3.27
BZf1aQVL
Output for 5.3.26
7nyTx8S0
Output for 5.3.25
WzamPEOQ
Output for 5.3.24
CyVoec16
Output for 5.3.23
90OPlDEf
Output for 5.3.22
6cYfdi5X
Output for 5.3.21
CwkJRHlo
Output for 5.3.20
f29HFOZe
Output for 5.3.19
q87tR6H1
Output for 5.3.18
7ePEnWoS