3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function generateSecretKey() { $secret_key_length_min = 8; $secret_key_length_max = 12; $chars = array_merge(range('a', 'z'), range('A', 'Z'), range('0', '9')); shuffle($chars); $chars = sha1(implode('', $chars) . 23); return substr($chars, mt_rand(0, strlen($chars) - $secret_key_length_max), mt_rand($secret_key_length_min, $secret_key_length_max)); } echo generateSecretKey();
Output for 7.1.0
960728379c
Output for 7.0.14
7326a714337b
Output for 7.0.12
ebfb12fef
Output for 7.0.11
471fbe6eb
Output for 7.0.10
18eed382da7e
Output for 7.0.9
89003ad1
Output for 7.0.8
f21789f26b5
Output for 7.0.7
720e4fc220fc
Output for 7.0.6
7a210260eb
Output for 7.0.5
b3cb11ce3be
Output for 7.0.4
589e1dd1
Output for 7.0.3
7c7197f1
Output for 7.0.2
2e3dbb5307f1
Output for 7.0.1
f087f47dc
Output for 7.0.0
76c1588c2c19
Output for 5.6.28
870e6692a3b6
Output for 5.6.27
225d5caf1dac
Output for 5.6.26
a8c020bf093
Output for 5.6.25
e2bff8a30
Output for 5.6.24
58494b637f44
Output for 5.6.23
342b416e2f
Output for 5.6.22
9f9955f6
Output for 5.6.21
2ab783e37
Output for 5.6.20
b70b7668802
Output for 5.6.19
54f62d51ddfb
Output for 5.6.18
a4f4e739b
Output for 5.6.17
c494d435e
Output for 5.6.16
40b8df51c
Output for 5.6.15
d19cba576b
Output for 5.6.14
a814b70e8fab
Output for 5.6.13
d655ffc2a881
Output for 5.6.12
32c14d3c
Output for 5.6.11
60d69b0a
Output for 5.6.10
eec7579b40e5
Output for 5.6.9
6c5b9ba76f
Output for 5.6.8
761e71a7c2
Output for 5.6.7
fe4c4fb55e32
Output for 5.6.6
8f92d78f
Output for 5.6.5
c054818029
Output for 5.6.4
5d567237
Output for 5.6.3
fb5cd3d9a99
Output for 5.6.2
33f55590fd
Output for 5.6.1
f360668677a
Output for 5.6.0
ee172055
Output for 5.5.38
afad6ed8b8
Output for 5.5.37
cc995373bf
Output for 5.5.36
fbbb938ed87
Output for 5.5.35
983e0ac3e
Output for 5.5.34
043967c2
Output for 5.5.33
5d11bda9eb
Output for 5.5.32
c8bab304
Output for 5.5.31
541c02fa
Output for 5.5.30
618768f511
Output for 5.5.29
deda47b98
Output for 5.5.28
7645bfd1
Output for 5.5.27
faa5a521
Output for 5.5.26
38847f282aa
Output for 5.5.25
517a51242a5
Output for 5.5.24
04263a317fe
Output for 5.5.23
668218a2
Output for 5.5.22
9882801381c6
Output for 5.5.21
2a306b14c662
Output for 5.5.20
8a03fec7e2ab
Output for 5.5.19
bd615a7399
Output for 5.5.18
66cd5dc209ed
Output for 5.5.16
62bc9a2e2f9
Output for 5.5.15
1422b25f
Output for 5.5.14
af66e20c4
Output for 5.5.13
05de3e0b18b
Output for 5.5.12
4dbcf5a2b
Output for 5.5.11
2ac0748a9
Output for 5.5.10
0d4adf66f5de
Output for 5.5.9
5b86a8163
Output for 5.5.8
a81fdf5e
Output for 5.5.7
18b701e6c82
Output for 5.5.6
3efd08015e
Output for 5.5.5
e76bd8cd6
Output for 5.5.4
7d8aac4d01f
Output for 5.5.3
007ba09c3
Output for 5.5.2
700b5b47
Output for 5.5.1
4dfdb7321f
Output for 5.5.0
df7dde4fed5
Output for 5.4.45
1dbc1cec8
Output for 5.4.44
ccc288830
Output for 5.4.43
c965b7b87ba5
Output for 5.4.42
82e3696080
Output for 5.4.41
02b7abc3
Output for 5.4.40
6a900582
Output for 5.4.39
b1c1cb26a0d
Output for 5.4.38
8e6e2f1392
Output for 5.4.37
8ceff9d1c7f
Output for 5.4.36
9ae779eba965
Output for 5.4.35
d43b0101ea
Output for 5.4.34
7e3e944370
Output for 5.4.32
57b7fc3617
Output for 5.4.31
05478af4e1
Output for 5.4.30
698373409fef
Output for 5.4.29
a324a765d7
Output for 5.4.28
88294fcf0
Output for 5.4.27
3d75603fe82
Output for 5.4.26
46780dc8cf26
Output for 5.4.25
7d6959232ef4
Output for 5.4.24
b023d98238b
Output for 5.4.23
4a5977261e
Output for 5.4.22
9dab3623
Output for 5.4.21
c7d1a00f51
Output for 5.4.20
e36463992
Output for 5.4.19
8a180ab3
Output for 5.4.18
0831e48bf12
Output for 5.4.17
d925c12c1
Output for 5.4.16
864bcccdcdc
Output for 5.4.15
5aad22c7fd
Output for 5.4.14
179947d53
Output for 5.4.13
ff0288eb9
Output for 5.4.12
e2de50bc4002
Output for 5.4.11
2c9af3c5fa2
Output for 5.4.10
deb826203981
Output for 5.4.9
5794a6da1
Output for 5.4.8
06abe5468
Output for 5.4.7
a01f7f2a9a8
Output for 5.4.6
ad5c4ea0cb
Output for 5.4.5
e01040db
Output for 5.4.4
29f59689f
Output for 5.4.3
be79eee8772
Output for 5.4.2
270b34499
Output for 5.4.1
802af0d076
Output for 5.4.0
441548009
Output for 5.3.29
cf99a4f862
Output for 5.3.28
46aab9f8de
Output for 5.3.27
5d6a2c0d39
Output for 5.3.26
b40de04a4f
Output for 5.3.25
2287a378bddf
Output for 5.3.24
4cdc3b0524
Output for 5.3.23
c7cdba3e536
Output for 5.3.22
6b98811d0584
Output for 5.3.21
551a9d5b62
Output for 5.3.20
8997b5a9068e
Output for 5.3.19
e5e0f39599
Output for 5.3.18
cdbb9b9c4b5a
Output for 5.3.17
4a00be7a69
Output for 5.3.16
181618ff
Output for 5.3.15
b7820360b
Output for 5.3.14
4f68ca40
Output for 5.3.13
8f22f62a59f3
Output for 5.3.12
55e5bfd365
Output for 5.3.11
0dda0fa1
Output for 5.3.10
900ca440b
Output for 5.3.9
77a94c9f10a
Output for 5.3.8
ebc5636c
Output for 5.3.7
82dc307a7
Output for 5.3.6
f633fe3c449
Output for 5.3.5
f56698dbc758
Output for 5.3.4
583db5c78
Output for 5.3.3
7e75f1bd61d2
Output for 5.3.2
8792027bb4
Output for 5.3.1
0afed8278c
Output for 5.3.0
96cbebe3f7e
Output for 5.2.17
d16bbf2a
Output for 5.2.16
af2c20fca
Output for 5.2.15
73ec68215c49
Output for 5.2.14
de68d7624
Output for 5.2.13
47aff8fec5
Output for 5.2.12
421364e3
Output for 5.2.11
1e09463046
Output for 5.2.10
ba018c9a
Output for 5.2.9
230906a5
Output for 5.2.8
5d93016d1ce
Output for 5.2.7
42469adfe21
Output for 5.2.6
cda306a8021d
Output for 5.2.5
9955f083
Output for 5.2.4
96c092a4e334
Output for 5.2.3
df500508e3f
Output for 5.2.2
3b1f33d6e
Output for 5.2.1
bdc9680977f
Output for 5.2.0
1fc1dd086fb
Output for 5.1.6
888620dfe6d
Output for 5.1.5
55fa9baea
Output for 5.1.4
8c085a52da0
Output for 5.1.3
df0a46b6
Output for 5.1.2
b91477e62cc
Output for 5.1.1
141e3a8b
Output for 5.1.0
cda06096
Output for 5.0.5
93c8e29e31
Output for 5.0.4
47bc13c515
Output for 5.0.3
a11b7a8f343a
Output for 5.0.2
767cc4cfe5f
Output for 5.0.1
8a5fb0e29b13
Output for 5.0.0
d8dacc8d
Output for 4.4.9
dd45a53d
Output for 4.4.8
c2452cb653b
Output for 4.4.7
0a00d404dce
Output for 4.4.6
aa6f42c85
Output for 4.4.5
ab227cee1f
Output for 4.4.4
1d01c9d4913
Output for 4.4.3
1f316436862d
Output for 4.4.2
6bca842e717c
Output for 4.4.1
e932f374e4
Output for 4.4.0
3b5d1605b7f3
Output for 4.3.11
d1069741f1
Output for 4.3.10
4d1118aa368
Output for 4.3.9
39fab5cb1ca
Output for 4.3.8
9e9f9558aad7
Output for 4.3.7
22dd56224
Output for 4.3.6
93944fc17c9
Output for 4.3.5
2471f306d48
Output for 4.3.4
602ad918f
Output for 4.3.3
8d0b5f022757
Output for 4.3.2
af3e32370bb0
Output for 4.3.1
155a1017
Output for 4.3.0
b827378e