3v4l.org

run code in 300+ PHP versions simultaneously
<?php function randomPassword() { $currentmonth = date('n'); $alphabet = "abcdefghijklmnopqrstuwxyzABCDEFGHIJKLMNOPQRSTUWXYZ"; $random = "abcdefghijklmnopqrstuwxyzABCDEFGHIJKLMNOPQRSTUWXYZ0123456789"; $pass = array(); $alphaLength = strlen($random) - 1; for ($i = 0; $i < 5; $i++) { $n = rand(0, $alphaLength); $pass[] = $random[$n]; } $pass[4] = substr($alphabet, $currentmonth - 1, 1); return implode($pass); } echo randomPassword();
Output for 8.3.1
EJ7Zl
Output for 8.3.0
U9e1l
Output for 8.2.14
JZHwl
Output for 8.2.13
QusKl
Output for 8.2.12
0Wrql
Output for 8.2.11
ENGfl
Output for 8.2.10
ITAhl
Output for 8.2.9
NgNSl
Output for 8.2.8
8ohJl
Output for 8.2.7
RhlOl
Output for 8.2.6
Fr9wl
Output for 8.2.5
bihrl
Output for 8.2.4
SMIol
Output for 8.2.3
gh3Wl
Output for 8.2.2
Duebl
Output for 8.2.1
ATN5l
Output for 8.2.0
IAdBl
Output for 8.1.27
gPJql
Output for 8.1.26
jOLrl
Output for 8.1.25
OjBRl
Output for 8.1.24
RzYfl
Output for 8.1.23
as1dl
Output for 8.1.22
rXJEl
Output for 8.1.21
aRIGl
Output for 8.1.20
Iz6Pl
Output for 8.1.19
qPcMl
Output for 8.1.18
CFd3l
Output for 8.1.17
Faxsl
Output for 8.1.16
CfpOl
Output for 8.1.15
5UKsl
Output for 8.1.14
QbDNl
Output for 8.1.13
4YU5l
Output for 8.1.12
HSDpl
Output for 8.1.11
OqFTl
Output for 8.1.10
h2XXl
Output for 8.1.9
fG0Rl
Output for 8.1.8
XNbul
Output for 8.1.7
QsLtl
Output for 8.1.6
3Yshl
Output for 8.1.5
cAgyl
Output for 8.1.4
a3nll
Output for 8.1.3
ztUgl
Output for 8.1.2
7JE2l
Output for 8.1.1
fxBRl
Output for 8.1.0
5sL9l
Output for 8.0.30
porHl
Output for 8.0.29
GkcRl
Output for 8.0.28
nxwYl
Output for 8.0.27
pQLNl
Output for 8.0.26
uG6zl
Output for 8.0.25
082Hl
Output for 8.0.24
Ibn6l
Output for 8.0.23
Yogdl
Output for 8.0.22
thnll
Output for 8.0.21
7hsrl
Output for 8.0.20
AUHfl
Output for 8.0.19
yrkpl
Output for 8.0.18
AG67l
Output for 8.0.17
4IQFl
Output for 8.0.16
Tu4dl
Output for 8.0.15
06Kkl
Output for 8.0.14
DdaXl
Output for 8.0.13
jNTBl
Output for 8.0.12
oLIBl
Output for 8.0.11
t3gfl
Output for 8.0.10
LfKEl
Output for 8.0.9
kirgl
Output for 8.0.8
c2w4l
Output for 8.0.7
B9tAl
Output for 8.0.6
NmE9l
Output for 8.0.5
lR99l
Output for 8.0.3
a8Epl
Output for 8.0.2
iqkkl
Output for 8.0.1
ghZfl
Output for 8.0.0
aawml
Output for 7.4.33
379Dl
Output for 7.4.32
wgLml
Output for 7.4.30
Rw5kl
Output for 7.4.29
zJ0Ul
Output for 7.4.28
o51zl
Output for 7.4.27
kjOgl
Output for 7.4.26
9agEl
Output for 7.4.25
lZeel
Output for 7.4.24
AWWEl
Output for 7.4.23
IAhRl
Output for 7.4.22
btfil
Output for 7.4.21
cLKYl
Output for 7.4.20
ry15l
Output for 7.4.19
xB6Il
Output for 7.4.18
QHnMl
Output for 7.4.16
GAhml
Output for 7.4.15
4QWil
Output for 7.4.14
30RBl
Output for 7.4.13
J8Hal
Output for 7.4.12
zImTl
Output for 7.4.11
C6tSl
Output for 7.4.10
PMD1l
Output for 7.4.9
hdQfl
Output for 7.4.8
PHAWl
Output for 7.4.7
2lbWl
Output for 7.4.6
Nuxul
Output for 7.4.5
rkq0l
Output for 7.4.4
mFEdl
Output for 7.4.3
YTe8l
Output for 7.4.2
Fz8Nl
Output for 7.4.1
PlQYl
Output for 7.4.0
L2dbl
Output for 7.3.33
abeBl
Output for 7.3.32
Qbpql
Output for 7.3.31
gOuHl
Output for 7.3.30
sLFIl
Output for 7.3.29
WyIrl
Output for 7.3.28
J2dhl
Output for 7.3.27
Hskxl
Output for 7.3.26
SFYyl
Output for 7.3.25
sMXXl
Output for 7.3.24
7J6Kl
Output for 7.3.23
aBb4l
Output for 7.3.22
uPfzl
Output for 7.3.21
iZkal
Output for 7.3.20
0E71l
Output for 7.3.19
F4X3l
Output for 7.3.18
6Zmbl
Output for 7.3.17
IQQUl
Output for 7.3.16
3YYnl
Output for 7.3.15
p4Rdl
Output for 7.3.14
Z3nGl
Output for 7.3.13
bJSsl
Output for 7.3.12
SEwql
Output for 7.3.11
Qxdql
Output for 7.3.10
Nydgl
Output for 7.3.9
2sw6l
Output for 7.3.8
UrO9l
Output for 7.3.7
l5wEl
Output for 7.3.6
iIuEl
Output for 7.3.5
JYuyl
Output for 7.3.4
QA6jl
Output for 7.3.3
QPKql
Output for 7.3.2
TwTMl
Output for 7.3.1
39tNl
Output for 7.3.0
gzOll
Output for 7.2.34
pRrsl
Output for 7.2.33
5CxGl
Output for 7.2.32
zooql
Output for 7.2.31
rQ30l
Output for 7.2.30
afS6l
Output for 7.2.29
AFFnl
Output for 7.2.28
1ZhNl
Output for 7.2.27
d8Iyl
Output for 7.2.26
B9kMl
Output for 7.2.25
iKRJl
Output for 7.2.24
fn0al
Output for 7.2.23
qRXal
Output for 7.2.22
gM2Al
Output for 7.2.21
pUBzl
Output for 7.2.20
be7pl
Output for 7.2.19
5Gool
Output for 7.2.18
ScEwl
Output for 7.2.17
4sq0l
Output for 7.2.16
jcSul
Output for 7.2.15
EY8ul
Output for 7.2.14
Jrcsl
Output for 7.2.13
ApZzl
Output for 7.2.12
9rOcl
Output for 7.2.11
dUxql
Output for 7.2.10
gPwul
Output for 7.2.9
73X8l
Output for 7.2.8
ZWKFl
Output for 7.2.7
uKWtl
Output for 7.2.6
Oan1l
Output for 7.2.5
0E4El
Output for 7.2.4
2fzDl
Output for 7.2.3
h3Srl
Output for 7.2.2
9NKCl
Output for 7.2.1
LjBcl
Output for 7.2.0
wgWxl
Output for 7.1.13, 7.1.33
ZgOOl
Output for 7.1.32
9gNjl
Output for 7.1.31
Cg1El
Output for 7.1.30
HqMel
Output for 7.1.29
Bskll
Output for 7.1.28
YUzfl
Output for 7.1.27
peU4l
Output for 7.1.26
WOBwl
Output for 7.1.25
M9oql
Output for 7.1.24
NxpPl
Output for 7.1.23
h6Y3l
Output for 7.1.22
fpPcl
Output for 7.1.21
CCfHl
Output for 7.1.20
m6knl
Output for 7.1.19
maDcl
Output for 7.1.18
Zag5l
Output for 7.1.17
pJKYl
Output for 7.1.16
kc9Dl
Output for 7.1.15
EG9wl
Output for 7.1.14
902ol
Output for 7.1.12
7bB9l
Output for 7.1.11
SYUal
Output for 7.1.10
5wJdl
Output for 7.1.9
Srfyl
Output for 7.1.8
dGrjl
Output for 7.1.7
qSZWl
Output for 7.1.6
fchNl
Output for 7.1.5
EGhjl
Output for 7.1.4
QaCdl
Output for 7.1.3
7odql
Output for 7.1.2
KcpFl
Output for 7.1.1
gg8jl
Output for 7.1.0
kqi8l

preferences:
81.35 ms | 691 KiB | 5 Q