3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function GeneratePassword($length, $map) { $result = ''; for ($i = 0; $i < $length; ++$i) { $result .= substr(str_shuffle($map), 0, 1); } return $result; } echo GeneratePassword(7,'abczxc012394');
Output for 7.1.0
304a2x1
Output for 7.0.14
z1c2022
Output for 7.0.6
0ax1023
Output for 7.0.5
xz4x0c0
Output for 7.0.4
32cax14
Output for 7.0.3
b1cc3bb
Output for 7.0.2
bxcb4zc
Output for 7.0.1
b1z340a
Output for 7.0.0
213zcc9
Output for hhvm-3.12.0
c9x0cac
Output for hhvm-3.10.0
4cc9021
Output for 5.6.28
1cbx199
Output for 5.6.21
21bx2a3
Output for 5.6.20
4a0x9xx
Output for 5.6.19
zz2a0c3
Output for 5.6.18
a144z24
Output for 5.6.17
aca0303
Output for 5.6.16
xc99x99
Output for 5.6.15
90c9a93
Output for 5.6.14
c4za313
Output for 5.6.13
b19x0z2
Output for 5.6.12
4z10cc1
Output for 5.6.11
4xa1z1b
Output for 5.6.10
bb42c23
Output for 5.6.9
4zxc229
Output for 5.6.8
121303c
Output for 5.6.7
ca2z093
Output for 5.6.6
12az91b
Output for 5.6.5
b9a2zb3
Output for 5.6.4
0azaa43
Output for 5.6.3
z0ccbcb
Output for 5.6.2
0b4c4a2
Output for 5.6.1
3493zc2
Output for 5.6.0
aacb2bc
Output for 5.5.35
c0z1xax
Output for 5.5.34
1x44043
Output for 5.5.33
1b3abac
Output for 5.5.32
ba309c0
Output for 5.5.31
z1z3zxc
Output for 5.5.30
1cc00a9
Output for 5.5.29
9axcxab
Output for 5.5.28
1x039z0
Output for 5.5.27
02z4a20
Output for 5.5.26
90acc2c
Output for 5.5.25
xc1412c
Output for 5.5.24
3bxz402
Output for 5.5.23
04a03x3
Output for 5.5.22
2azz09a
Output for 5.5.21
9z3czac
Output for 5.5.20
3z3ac44
Output for 5.5.19
3zc2c12
Output for 5.5.18
19cz92a
Output for 5.5.16
a2ca123
Output for 5.5.15
4x911c9
Output for 5.5.14
c30zxbc
Output for 5.5.13
3002zb3
Output for 5.5.12
9bx49aa
Output for 5.5.11
9c01xcx
Output for 5.5.10
z11ccz3
Output for 5.5.9
c9czb03
Output for 5.5.8
99z0c99
Output for 5.5.7
a4322cc
Output for 5.5.6
aax91x9
Output for 5.5.5
2xcczbc
Output for 5.5.4
ac0ccbz
Output for 5.5.3
2a904b2
Output for 5.5.2
ccc3c34
Output for 5.5.1
xcb3044
Output for 5.5.0
00xcax3
Output for 5.4.45
2a43xac
Output for 5.4.44
x1b43x9
Output for 5.4.43
z404x92
Output for 5.4.42
3c1xcaa
Output for 5.4.41
x24xx1c
Output for 5.4.40
b9b4zxa
Output for 5.4.39
c9c39zx
Output for 5.4.38
4cxc412
Output for 5.4.37
2x0zxzx
Output for 5.4.36
bzcxz24
Output for 5.4.35
bca92cz
Output for 5.4.34
xzbz290
Output for 5.4.32
49cc0a1
Output for 5.4.31
ccz39xc
Output for 5.4.30
cc4cczc
Output for 5.4.29
zc1413a
Output for 5.4.28
cx013b2
Output for 5.4.27
ax4z3c4
Output for 5.4.26
b0cza14
Output for 5.4.25
1b0cab2
Output for 5.4.24
0b39120
Output for 5.4.23
0aa22xx
Output for 5.4.22
22a1acx
Output for 5.4.21
c0czccc
Output for 5.4.20
3z342x4
Output for 5.4.19
c92ac3c
Output for 5.4.18
31azc41
Output for 5.4.17
1x439cx
Output for 5.4.16
babxcxx
Output for 5.4.15
c931224
Output for 5.4.14
3a2x029
Output for 5.4.13
212a303
Output for 5.4.12
32b3az9
Output for 5.4.11
a139a9c
Output for 5.4.10
9x3cz1c
Output for 5.4.9
3zx3bzb
Output for 5.4.8
cbbc10c
Output for 5.4.7
3b39191
Output for 5.4.6
331zb2a
Output for 5.4.5
310xcx4
Output for 5.4.4
z219cb2
Output for 5.4.3
2aa1201
Output for 5.4.2
14ca02c
Output for 5.4.1
c12c133
Output for 5.4.0
xz4cc43
Output for 5.3.29
c30cxa1
Output for 5.3.28
b3xcz02
Output for 5.3.27
191zxz9
Output for 5.3.26
2za232c
Output for 5.3.25
xz1c04b
Output for 5.3.24
4249200
Output for 5.3.23
44a0z32
Output for 5.3.22
ca3314x
Output for 5.3.21
a2xb01z
Output for 5.3.20
01zbz4c
Output for 5.3.19
90c0x91
Output for 5.3.18
99b14a9
Output for 5.3.17
c93bbc1
Output for 5.3.16
0x32cc4
Output for 5.3.15
zaa411c
Output for 5.3.14
a091b1a
Output for 5.3.13
x9c1zb1
Output for 5.3.12
9xxcc4x
Output for 5.3.11
z42b20a
Output for 5.3.10
azb0bcc
Output for 5.3.9
9aazx0x
Output for 5.3.8
0zz0a2x
Output for 5.3.7
2b041b0
Output for 5.3.6
1z10090
Output for 5.3.5
c2b19zx
Output for 5.3.4
24932bx
Output for 5.3.3
03bb0zb
Output for 5.3.2
ac104xz
Output for 5.3.1
a9ac241
Output for 5.3.0
cz92z0c
Output for 5.2.17
3b9c11c
Output for 5.2.16
2ba133z
Output for 5.2.15
4c949bz
Output for 5.2.14
ccxx4cx
Output for 5.2.13
23b109z
Output for 5.2.12
a3a10z0
Output for 5.2.11
3b0ccb1
Output for 5.2.10
3z4az94
Output for 5.2.9
3bb3zbc
Output for 5.2.8
1091x1a
Output for 5.2.7
cb0cxz0
Output for 5.2.6
024c4z3
Output for 5.2.5
cbx30bc
Output for 5.2.4
axa4419
Output for 5.2.3
1x0bb0z
Output for 5.2.2
0z12b24
Output for 5.2.1
c3b149c
Output for 5.2.0
2x9z0cc
Output for 5.1.6
14x4xzc
Output for 5.1.5
zx0b29c
Output for 5.1.4
z4aaz0x
Output for 5.1.3
930c239
Output for 5.1.2
x4144bx
Output for 5.1.1
3901zc2
Output for 5.1.0
ccc00cb
Output for 5.0.5
x9c2ab4
Output for 5.0.4
aaba2a0
Output for 5.0.3
z1zzx40
Output for 5.0.2
z2x9cb4
Output for 5.0.1
cz9c049
Output for 5.0.0
azc20xz
Output for 4.4.9
azx2z92
Output for 4.4.8
320329c
Output for 4.4.7
bx9c19c
Output for 4.4.6
zz3za4x
Output for 4.4.5
b2aab39
Output for 4.4.4
4zbz01a
Output for 4.4.3
x1430a3
Output for 4.4.2
z3b1c40
Output for 4.4.1
a222zaa
Output for 4.4.0
c9934z1
Output for 4.3.11
32x3b4c
Output for 4.3.10
ac423z3
Output for 4.3.9
4c1b414
Output for 4.3.8
a9c3319
Output for 4.3.7
a0cxxcc
Output for 4.3.6
9ac1z3x
Output for 4.3.5
xb9c9c9
Output for 4.3.3 - 4.3.4
cb0accb
Output for 4.3.2
2xxa9za
Output for 4.3.1
2103cxc
Output for 4.3.0
39419a9